Send Email Event Data to Segment

Oh, but wait. The Segment App Connection keeps on giving and not only enhances your contact lists but can also send your email event data (opens, clicks, bounces, etc.) back to Segment just in time for you to earn your big data black belt. This is helpful if you want to put your Mailjet event data alongside other engagement or traction data (for example: Mixpanel, Google Analytics, your CRM, etc.).

Activate Send Data to Segment

On the Mailjet Side:

To activate “Send data to Segment”, you will need to enter your Segment “Write Key” into the Mailjet Segment Page as shown below.


Your “Write Key” is provided by Segment and is used to identify Segment’s client account so that the Mailjet system knows where to send data to and where to receive data from.

You can quickly find your Segment Write Key by using this link:[WORKSPACE]/sources/[SOURCE_NAME]/settings/keys

(Where you need to replace [WORKSPACE] and [SOURCE_NAME] with the names of your Segment workspace and source, respectively).

Or you can log into your Segment account, select your workspace and source, then click on ‘Overview’.

  1. Copy the “Write Key” from your Segment page.


  2. Jump back to your Mailjet account, paste the Write key code Into the Send data scenario and click on the ‘Enable‘ button.


  3. Mailjet will then generate an EndPoint URL and populate it on the Triggers page of your account.


  4. All events are selected by default. Should you want to send only certain events to Segment, just uncheck or keep checked the different event types and click on ‘Save’.

Please note: if you already have an EndPoint URL on your Triggers page, the following pop-in will appear:


You then need to decide which option to use:

  • Keep existing endpoints – keep the existing endpoint URL and the option “Send Data to Segment” will NOT be activated.


  • Replace with Segment endpoints – replace the current endpoint URL on the Trigger page to allow Mailjet to send events to Segment.

Finally, the information that is forwarded to your Segment account is dependent on the kind of events you specify in the Segment account. The events that are supported by Mailjet and Segment are:

  • Open events – sent as “Email Opened” to Segment
  • Click events – sent as “Email Link Clicked” to Segment
  • Bounce events – sent as “Email Bounced” to Segment
  • Spam events – sent as “Email Marked as Spam” to Segment
  • Blocked events – sent as “Blocked” to Segment
  • Unsubscribe events – sent as “Unsubscribed” to Segment
  • Sent events – sent as “Delivered” to Segment

Tracking Campaigns

Thanks to the ‘Send Data to Segment’ functionality, you are able to also track your campaigns as a whole. Simply access your Segment account and filter the event data by campaign name.

However, for transactional emails the campaign name that appears in Segment will be taken from the Subject of the email. As quite often the email subjects are personalized (e.g. “Thank you for registering, Mr. XYZ” or “Your Order #XYZ was Accepted”) you may not be able to properly filter the results for the emails you want.

To make it easy for you to filter through your event data, we offer two additional technical solutions:

  1. Grouping emails into a campaign - You can set a campaign name in the CustomCampaign property and Segment will receive it as customcampaign parameter. Also the emails will be grouped in Mailjet under the name you have set for CustomCampaign.

    For more information please click here.

  2. Tagging the emails - You can set a tag or campaign name in the CustomID property. Segment will receive this information in the CustomID parameter, so you can use it to filter through your emails using that property.

    For more information please click here.