SendGrid Analytics Integration
You will need to do two (maybe three) things to get this working.
These steps typically take less than 15 minutes.
Step 1: Send Events From SendGrid to Embarke
In order to send events from SendGrid to Embarke, you will need to enable the “Event Notification” app and point it to the Embarke API. Here are the steps.
- Log in to SendGrid.com
- Click on the Apps link at the top of the screen.
- Click “Show Disabled Apps”
- Click “Enable” on the “Event Notification” app.
- Click back to “Show Enabled Apps”
- Click “Settings” on the “Event Notification” app.
- Check ALL of the boxes under “Notify Me When”
- Check “Batch event notifications” as well
- Set Post Event URL to: https://profile.api.embarke.com/EventNotification/SendGridEvents
- Click the “Save Changes” button.
Step 2: Add Tracking Info To Each Message
(only necessary if you’re delivering transactional messages)
In order to track messages, Embarke requires that you add two parameters to the messages you’re already sending to SendGrid. They make this easy through the “unique_args” parameter of the X-SMTPAPI fields.
Two examples depending on your setup are below:
If sending through SMTP include the following email header: X-SMTPAPI: {"unique_args":{"embarkeAppId":"<YourAppId>","embarkeMsgId":"<GUID/UUID>"}} |
If sending over HTTP use the following parameter: x-smtpapi= {"unique_args":{"embarkeAppId":"<YourAppId>","embarkeMsgId":"<GUID/UUID>"}} |
- Set the “embarkeAppId” to the Application ID provided in the customer dashboard. This is the ID assigned to your company by Embarke.
- Set the “embarkeMsgId” to a new a new GUID / UUID generated for this message. You must generate a new ID for each message that you send out. This is easy to do in most languages and here are a couple examples for you:
C# - Guid.NewGuid().ToString(); Ruby - SecureRandom.uuid |
Step 3: Add tracking info to Newsletters
(only necessary if you’re delivering newsletter messages)
One-time:
Create a new category with the name:
embarkeAppId:YourAppIdGoesHere
(NO SPACES!)
For each newsletter: Select this category if you want it tracked by Embarke!
That’s IT! Log into your dashboard and start watching amazing user-based statistics roll in!








