Skip to content

Instantly share code, notes, and snippets.

@commuterjoy
Created July 8, 2015 14:31
Show Gist options
  • Save commuterjoy/321b459a704df309cd31 to your computer and use it in GitHub Desktop.
Save commuterjoy/321b459a704df309cd31 to your computer and use it in GitHub Desktop.
{
"context": {
"product": "next",
"requestedSendTime": "1436245212",
"geoIp": {
"latitude": 37.4536,
"city": "Incheon",
"region": "12",
"longitude": 126.7317,
"country": "KR"
},
"source": "simple-email-service",
"eventTimestamp": "1436279863",
"userUuid": "b60d5e25-f9d7-4c66-bfba-b6c45b922166",
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.5.17 (KHTML, like Gecko)",
"transactionId": "0x5399b8ae97000000"
},
"action": "open",
"category: "email",
"system": {
"source": "simple-email-service-analytics"
}
}
@markstephens
Copy link

{
    "user": {
        "ft_guid": "b60d5e25-f9d7-4c66-bfba-b6c45b922166", // This should be user.ft_guid"
    },

    "device": {
        "geo": {  // We should make a space for this in device (named it geo to match egest)
            "latitude": 37.4536,
            "city": "Incheon",
            "region": "12",
            "longitude": 126.7317,
            "country": "KR"
        },
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.5.17 (KHTML, like Gecko)", // This should be in device, renamed user_agent
    },

    "context": {
        "product": "next",  // The product isn't next, suggest omit it or set it to something like email or marketing
        "requestedSendTime": "1436245212",
        "source": "simple-email-service",
        "eventTimestamp": "1436279863",
        "id": "0x5399b8ae97000000" // Use context.id instead of transactionID
    },
    "action": "open",
    "category": "email",
    "system": {
        "source": "simple-email-service", // Removed '-analytics'
        "version": "0.0.0", // Needs a version
        "api_key": "" // Adn eventually an API key
    }    
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment