Using a campaign code or custom parameter in Analytics reports
Sometimes, one customer parameter just isn't enough. :)
With our custom parameter field, you can collect additional data about every open. You could use this field to include a campaign code, web analytics code, or another merge field from your messaging platform or email service provider (ESP).
Where does this data go?
When you've configured your tracking code to include an additional parameter and send it out to your subscribers, the data will populate inside your individual-level report, in the "custom_type" field. (screenshots below.)
How can this parameter benefit me?
We recommend you create a unique tracking code for every email you send, but if you have the need to use a single tracking code for multiple emails, as may be the case if you re-use a common email template, custom parameters will allow you to add a variable that will populate the custom_type field with a campaign-level unique identifier, and then automatically bring the data back to your organization via exporting your individual-level report or setting up an FTP feed.
With "global" analytics coverage across all of your sends, and the data collected with unique identifiers, you can easily generate insightful client reports, track campaign effectiveness over time, and much more with the analytics data, you export for your tracking code. (More resources at the bottom of this post.)
How do I set up my tracking code to supply this information?
When you create a new tracking code, start by choosing your ESP. This will add the default unique user ID (UUID) merge tag your ESP uses to populate the recipient ID (the specific name varies depending on the ESP - eg 'Contact ID' 'Lead ID' Record ID' Subscriber Number, etc). It is this ID that you will need to use to tie back any data to a specific recipient. More information on UUID merge tags can be found here.
In Step 2, you will be able to add as many custom parameters (i.e. merge tags like campaign ID, tags, etc.) as you would like. You will need to separate each custom data tag out with a plus sign (+) after each tag, for example: *|CAMPAIGN_UID|*+custom-data1+custom-data-2+custom-data-3
Note: To ensure no subscriber personally identifiable information (PII) is stored by Litmus, any data that is collected via this merge tag that resembles an email address will be scrubbed and will not be stored or appear in Email Analytics reports.
Here's an example of how your tracking code might look with custom parameters added:
In the expanded tracking code above, the individual-level UUID merge tag appears in red. The green text is where your custom parameters will show up.
Examples of custom parameters:
- Static text (for example "JuneNews")
- Another merge tag that identifies the field from your ESP
You'll also want to be sure that you convert any spaces or special characters to their ASCII equivalents for proper URL encoding. For example, "&t=Café News" would become "&t=Caf%E9%20News". W3Schools also has a handy reference and tool you can use.
When you export your individual level tracking data, you'll see the additional custom parameters in the custom_type field in your CSV. (screenshot below)
Mailchimp Campaign UID example
Mailchimp provides a Campaign_UID that "Displays the unique ID from your campaign archive URL."
Here, we've inserted the listed merge tag, which is
*|CAMPAIGN_UID|* into our tracking code:
Litmus tracking code (indented for clarity) configured to retrieve Mailchimp's campaign_uid.
On inserting this tracking code and sending it out across several campaigns, here is what the individual-level report looks like:
Individual-level report with data in custom_type field.
These strings can be made meaningful by referring to Mailchimp's Campaign Archive page, to see which campaign has what UID.
Now, if you have an onboarding campaign, or want to track engagement and opens across many email campaigns, you can get all the data into a single tracking code, instead of creating new tracking codes for every campaign.
Once you're using a merge tag in this configuration, you can choose to receive our analytics data via FTP. Otherwise, you'll need to keep logging into your Litmus account, and re-exporting the file containing data in the Custom Campaign Type field.
To get FTP access, you'll need to be on an existing Pro plan or an Enterprise plan and then send us an email (firstname.lastname@example.org) with server credentials, so we can send you that data. Complete this form to have someone get in touch about our Enterprise plans!
If you're using our Reseller API, you may export your raw data.