Ingest your event data from Mailjet into RudderStack.
2 minute read
Mailjet is a popular email marketing and delivery platform. It lets you create and send impactful email marketing campaigns, newsletters, and automated emails to grow your business.
This guide will help you set up Mailjet as a source in RudderStack.
Getting started
Follow these steps to set up your Mailjet source in the RudderStack dashboard:
Go to your RudderStack dashboard and click Add Source. From the list of Event Streams sources, select Mailjet.
Assign a name to your source and click Continue.
Your Mailjet source is now configured. Note the Webhook URL in the Settings tab:
Click your profile and select Account Settings. Under the Rest API section, click Event notifications (webhooks).
You can either select all events or the specific ones and add the webhook URL:
Event transformation
RudderStack ingests all events mentioned in the Mailjet documentation. The event name is mapped on the basis of the event property which is present in each event.
RudderStack ingests the Mailjet events after converting them into the RudderStack event format. It also maps the following properties from the Mailjet event payload to the RudderStack properties:
Mailjet property
RudderStack property
event
event
mj_contact_id
context.externalId[]
messageId
properties.mailJetMessageId
email
context.traits.email
url
properties.url context.page.url
ip
properties.ip context.ip
customId SHA-256 hash of email
userID
customcampaign
properties.customcampaign
mj_campaign_id
cproperties.mj_campaign_id
Payload
properties.Payload
agent
context.userAgent
source
context.campaign.source
mj_list_id
context.externalId[]
How RudderStack creates the event payload
This section details how RudderStack receives the data from Mailjet source and creates the resulting payload.
A sample payload sent by Mailjet is shown below:
{"event":"open","time":1664443614,"MessageID":94857068804950690,"Message_GUID":"54d6cdec-f659-4547-8926-13d9c4126b82","email":"alex@example.com","mj_campaign_id":108760,"mj_contact_id":399962859,"customcampaign":"mj.nl=58424","ip":"66.249.84.231","geo":"US","agent":"Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)","CustomID":"","Payload":""}
RudderStack transforms the above payload into the following track payload:
{"Message":{"context":{"library":{"name":"unknown","version":"unknown"},"integration":{"name":"MailJet"},"traits":{"email":"alex@example.com"},"ip":"66.249.84.231","userAgent":"Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)","externalId":[{"type":"mailjetContactId","id":399962859}]},"integrations":{"MailJet":false},"type":"track","event":"open","properties":{"ip":"66.249.84.231","customcampaign":"mj.nl=58424","mj_campaign_id":108760,"Payload":""},"originalTimestamp":"2022-09-29T09:26:54.000Z","userId":"9c51bf2b379a4c773b1eaa9732405b86"}}
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.