SendGrid: Configuring Webhooks
Lytics highly recommends setting up SendGrid event notifications to post event data to the Lytics. This will allow Lytics to get real-time activity data such as clicks, opens, etc. on your marketing campaigns and transactional emails. If you are running the SendGrid Import Audiences, the job will configure webhooks for you. However if you want to set them up manually, or you had previously configured webhooks to send to another system, you may need to update your settings.
Lytics requires that webhooks are enabled to use SendGrid Experiences as part of the Lytics Canvas because it allows for the collection of reporting metrics for your SendGrid Experiences.
To set up event notifications to go to Lytics, you will need to have a Lytics API token ready, you can read how to generate a new API token if you do not already have one. Then follow these steps:
- Login to your SendGrid account.
- Navigate to Mail Settings under the Settings menu.
- Click on Event Notification to open your webhook settings.
- Click edit in the top right corner to change your event notification settings.
- In the HTTP POST URL textbox, enter the following URL:
https://c.lytics.io/collect/json/sendgrid_webhooks?access_token={API_TOKEN}
Replace{API_TOKEN}
with your Lytics API token. - Under Select Actions check the boxes for the events you would like to recieve in Lytics. You may select All, or the following event types are recommended for collection:
- Dropped
- Delivered
- Bounced
- Opened
- Clicked
- Unsubscribed From
- Mark as Spam
- ASM Group Unsubscribe
- ASM Group Resubscribe
- Once you've selected event types, click the check mark button in the top right corner. Then make sure you toggle the button in the left-hand corner to On.
Lytics will then receive real-time event data to the sendgrid_webhooks
stream. If you've run the SendGrid Import Audiences job, default mapping is automatically provided. Otherwise, contact Lytics support to add the mappings for SendGrid activity in your account.