Iterable email campaign metrics can show the number of purchases and revenue associated with the campaign.
There are two ways to set this up:
[Option 1] Link Rewriting and Browser Cookies
Use this method if the final checkout page is on the same domain as where you are generally taking your subscribers when they click a url.
For example, if your links take people to iterable.com and the final checkout page is iterable.com/cart.
1. Update your DNS records for links to point to links.yourdomain.com.
First, be sure to add in the custom project sending domain on the Settings--> Project page.
If you are using the default shared Amazon SES IP's, you can view the DNS records to add by going to Settings--> DNS Setup on the left menu.
If you are using dedicated IP's, you can add tracking domains by going to Settings--> Mail Domains on the left menu.
After link rewriting has been verified, whenever a user clicks on a link in an Iterable email template, we will then set the four cookies below on *.yourdomain.com.
How to check if cookies are being set:
Step 1: Send yourself a live email campaign (as opposed to a proof) with a link to your website and click on the link.
Step 2: When you arrive on your website, right click and then click "Inspect" to open the console:
Step 3: Click on "Application", then "Cookies", and you should see 4 cookies: iterableEmailCampaignId, iterableTemplateId, iterableMessageId and iterableEndUserId (the user's email address):
Note: If you do not see these four cookies, check the following:
1. Is the links.iterable.com DNS record verified as "True"? To check, go to Settings > DNS Setup.
2. Is the domain of the link in your email the same as the domain in your Project Settings? To see the domain currently set, go to Settings --> Project and look at "Custom Project Sending Domain":
When a user makes a purchase, you will call the Iterable trackPurchase API and include the info captured in theiterableEmailCampaignId, iterableTemplateId and iterableMessageId cookies in the call. The iterableCampaignId data should be written as a field called 'campaignId', the iterableTemplateId data should be written as a field called 'templateId', and theiterableMessageId data should be written as a field called 'messageId'. This way, we can tie purchase data and revenue from the email back to the referring campaign, template and message.
Attributing purchases to templates is important if you are using A/B testing in experiments, as different variations have different template IDs and this helps us attribute revenue to the correct variation. Attributing purchases to messages may also be deemed helpful, because a subscriber can receive multiple emails from a single campaign and template over time (from a triggered campaign, for example).
Here's a sample trackPurchase call with 'campaignId' and 'templateId'. Note that the data types for those fields are integers and not strings.
"name": "Iterable Stickers",
"description": "Put these stickers anywhere and everywhere!",
"categories": ["stickers", "novelty"],
"shippingAddress1": "360 3rd Street",
"shippingAddress2": "Suite 675",
"city": "San Francisco",
You will then be able to view purchase and revenue numbers in the campaign analytics view.
Note: If a person clicks on multiple emails within a 24 hour period, the purchase and revenue will be attributed to the last email they clicked.
[Option 2] UTM Parameters in Links
Use this method if the final checkout page is is NOT same domain as where you are generally taking your subscribers when they click a url.
For example, if your email links take people to iterable.com but your final checkout page is on purchaseiterable.com.
Enable Custom Link Parameters under the Advanced tab when editing a template.
From there you can append campaignId, templateId, email, and any other desired information to all links in your message.
[Option 3] Sent Time Period Attribution
A third option is to attribute any purchase made by a user within a specified time period of being sent the email to the campaign. This method may be less accurate, because it does not require the user to have opened or clicked the message to have the purchase be attributed to the campaign. It only requires that they were sent the message. This method does not require any additional engineering work.
To enable this option, in Step 1 of campaign setup, check the 'Use a custom conversion metric' box.
Enter 'iterable_purchase' in the Custom Conversion Event box. This particular custom event is handled a bit differently from other custom events, as it will cover any trackPurchase calls that are made via our commerce API.
Enter in a number from 1-168 in the attribution period box. Anyone who is sent an email and makes a purchase within the specified time window will have that purchase attributed to this campaign.
Note: If a user is sent two emails with 'iterable_purchase' attribution periods set, then the most recently sent campaign ID will take precedence for purchase/revenue attribution (assuming both periods are still active).
If a trackPurchase call is made and it specifies a campaign ID, then the purchase will be attributed to that campaign.