Emarsys can send tracking variables to external web analytics platforms, such as Google Analytics, to track contact behavior coming from email campaigns.
The external link tracking works by adding extra variables to the links in your email campaign, such as email name, email date, link category, etc. When a contact visits a web page via such a link, the analytics tool can then track their behavior and match it to an entry in your contact database via whichever identifiers (variables) have been used.
In this way you can see exactly how much interest, traffic or revenue an email campaign has generated for your web shop, and then segment the contacts according to their behavior. Depending on the analytics platform you use, this data can be returned to the Emarsys application automatically, manually via an import, or using the Emarsys API.
This feature is called External Analytics in the Emarsys application and can be activated for you by Emarsys Support. Emarsys Support can also provide you with a list of applications which integrate with the Emarsys application and advise you on implementing the Emarsys API.
Before you start, you might also want to read our best practices page on tracking dynamic links from external events.
How External Analytics Works
A web analytics platform categorizes the information that it logs according to variables that you define during setup. The platform then sorts the data according to the selected variables, and can combine variables together to provide a really fine-tuned breakdown of contact activity.
The Emarsys External Analytics feature works by matching the variables used by the analytics platform with the Emarsys application variables, and adding them to the URL of the links in the email. In this way the variables of the analytics are populated automatically with the Emarsys application data, for example campaign name, date, link name, etc.
This can be done on an account level for all email campaigns, or on a per-campaign basis.
Enabling External Analytics in Emarsys
Before you ask Emarsys Support to enable this feature, you should familiarize yourself with the variables and separators used in your web analytics platform, and decide on the ones you want to use in your Emarsys email campaigns.
You can choose between using the same variables for all your campaigns, or change them on a per-campaign basis.
If you want to use one set of variables for all email campaigns, simply provide Emarsys Support with the variable pairs which will map your web analytics tool fields with your Emarsys application fields.
If you choose to use different variables for individual campaigns, you will see a new text field in the Email Settings page. Here you enter the variable pairs manually and they will be added to the trackable link for that email.
Matching the variables
Web analytics platforms have a fixed number of variables that they use to filter content, and these are usually fewer in number than those available in the Emarsys application. When defining the variables in the analytics platform, therefore, you may want to combine several Emarsys variables per analytics variable to ensure that the resulting data is filtered according to your needs.
For example, if your analytics platform offers only one campaign ID variable (such as utm_campaign for Google Analytics), you can get around this limitation by combining several Emarsys variables and matching them all to this one. In this way you can create more complex filters, such as sorting responses from the same recurring campaign which occurred on different days.
As well as matching standard Emarsys variables, you can also choose to define a fixed value for the analytics variable by omitting the $ before and after the value. A full list of variables can be found in the Appendix below.
Example of matching complex variables
If you have a number of regular daily newsletters, you might want to be able to sort the responses in Google Analytics per newsletter by day, or compile all responses for all newsletters together. In this case you might do the following:
- match the Emarsys variables $cname$, $cmonth$ and $cday$ to utm_campaign
- match the static value newsletter to utm_source
The resulting URL would like something like:
Furthermore, for a newsletter called welcomecampaign, sent on March 23rd, the value for utm_campaign in Google would be: welcomecampaign0323.
Know Your Analytics Platform
Different analytics platforms use different syntax to build up statistics on website activity, so it is important that you understand what options are available to you from your chosen platform. They typically use their own naming conventions for variables, and some platforms use “&” to separate variables, others use “.”.
Below is a selection of the variables available in Google Analytics.
|Google Analytics Variable||Description|
||keyword analysis to identify a specific promotion|
||identify mechanism/type of message|
||key/search term used|
Different analytics packages also use different variables to describe the same data; below is an example of how the
campaign_ID variable can vary from platform to platform.
|Web Analytics Platform||Campaign Variable Syntax|
To ensure that the analytics platform collects the data correctly you also need to know what the mandatory variables for that platform are. For example,
utm_mediumvariables are required in order for Google Analytics to work, but for Coremetrics you would only need
cm: to capture data successfully.
Note: Omitting the mandatory variables will result in no data being sent to the analytics platform.
A comparison of the different syntax used
Below are some examples of how various analytics platforms would have their URL composed when capturing specific campaign data. To help illustrate this, each platform will aim to capture the same information so you can see the difference in the final URL. This information has been colour coded as follows:
|Information||Emarsys variables or fixed values|
|source or origin of the click||
|communication channel used|
|link name/URL used||
Each platform generally uses different labelling and syntax to separate variables; for more in-depth information please consult the relevant documentation for that platform.
This is what a blank Google Analytics syntax would look like that you would use to capture the content:
The finalized code used in the URL would look like this:
Coremetrics offers just one variable
cm_mmc which can contain up to four parameters, each of which can be matched to a variable from the Emarsys application. This is therefore what a blank Coremetrics syntax would look like that you would use to capture the content:
Following the Coremetrics syntax where the parameters are separated by ‘
-_-‘ the finalised code used in the URL would look like this:
This is what a blank Webtrends syntax would look like that you would use to capture the content (there is no Webtrends variable for the channel used):
The finalized code used in the URL would look like this:
Webtrekk & Omniture
Both of these analytics platforms use custom defined variables, so for this example there is no standard syntax example to showcase as both would involve a custom set up. For both of these products there would be an input parameter name and parameter value specified during setup that would then enable the analytics packages to work with the Emarsys application.
Important Data Privacy Note
According to compliance regulations please note that Web Analytics Platforms handle your data outside of the Emarsys application which can lead to legal liability if the analytics platform is hosted outside of your country. You need to make sure that the servers where Web Analytics Platform is hosted are compliant with any national laws applying to your organization as Emarsys cannot, and will not, accept any liability for your actions if you use a platform with incompatible data protection and associated laws applying to data handling and security.
Appendix: The Emarsys Variables
The Emarsys variables are mostly self-explanatory, with many of them allowing you to fine tune the time variables for campaigns, through to link information and category. To add flexibility there is the variable
N stands for the field ID from the Emarsys application.
Below is a list of the standard variables available for use in the Emarsys application, although it is important to note that the
$pers_N$ variable is a generic custom designation and is what any manual variables would be based on.
N can be swapped for any field ID in the Emarsys application to enable you to integrate your contacts database content with your web analytics platform.
In the Visual Content Editor (VCE) (also called as block-based email editor) the
$clinktitle$ variable refers to the name in analysis that can be specified in the Links tab. The variable
$clinkname$ is the linked text or image.
||campaign name (ASCII)|
||user’s element N|
||extra tracking variables that are enabled for you if you want to use individual tracking links for different campaigns.|
See Emarsys Field IDs and Values for more information on the fields available for use as Emarsys variables.