On this page:

See also:


Overview

You can define tracking parameters for transactional emails in two ways:

You can also hard-code tracking parameters in links in individual templates, however these will almost always be ignored if there’s a clash with any of the tracking parameters defined by any of the other methods.


Add tracking parameters in API request

Transactional emails are sent from Ometria to your contacts as a response to a transactional API request which Ometria receives via your ecommerce platform when a transactional event is triggered. 

Tracking parameters (sometimes UTM or URL parameters) can directly be defined in your API request.


Note: If you don’t have the setup to send transactional API requests already please contact your customer success manager, who can help you set it up.


Logic

The logic Ometria uses when appending tracking parameters to transactional email links is:

  • Take the transactional tracking parameters from the API call (if defined) and attach these to all transactional campaigns.
    • If none are defined in the API call, take the tracking parameters defined in Ometria at account level and attach these to all transactional campaigns. 
  • If there are any template specific parameters hard-coded in HTML templates, merge them with the above set parameters - if there isn’t a clash. 
    • If there is a clash, the parameters in the API call take priority.

Default tracking parameters

The default parameters mentioned below are used for transactional emails, if no parameters are defined in the platform or in an API call:

ParameterValue
utm_mediumemail
utm_sourcetransactional
utm_campaignom_<internal campaign hash>_<campaign title>
Example:
utm_campaign=om_f8xxexx8exx2_welcome_campaign

Example tracking parameters in an API request

This is a sample transactional API request with a tracking parameter defined that will append to links in ll transactional emails sent:

{
   "data": {},
   "transactional": true,
    "subject": "Password Reset",
    "to": {"name": "John Doe", "email": "customer@example.com"},
    "from": {"name": "Retailer Name", "email": "retailer@retailer.com"},
    "template_ID: 221,
    "sandbox": false,
    "stream": "password_reset",
    "url_parameters": {"utm_campaign": "transactional campaign"}
}

In the example above, when a transactional API call is received with the “url_parameters”:{parameter”:”value”} and a “template ID”, the parameter gets appended to the links in that template, and is sent to the ‘to’ address in the API call.


Note: To report on different transactional streams, e.g. order_confirmation, feedback, return, password_reset, etc., you don’t need to define a tracking parameter. 

You just need to make sure you have the stream value defined. 


In your transactional API request you can add a merge tag to add the title of the template, inside your tracking parameter:

template_title= {{ email.template_title|urlencode }}

This is a sample API request for appending a UTM parameter for the template title:

  "data": {},
   "transactional": true,
    "subject": "Password Reset",
    "to": {"name": "John Doe", "email": "customer@example.com"},
    "from": {"name": "Retailer Name", "email": "retailer@retailer.com"},
    "template_ID: 221,
    "sandbox": false,
    "stream": "password_reset",
    "url_parameters": {"utm_type": "transactional_campaign",
                    “template_title”: “{{ email.template_title|urlencode }}”}

Resulting link:

https://www.ometria.com/utm_campaign=omte_teststream&utm_type=transactional_campaign&om_campaign=omte_teststream&om_profile=27f4-4b7a60-0011de39&om_send=63ca902792644c56b8d4f46dc6a27b84&template_title=Joe_passwordreset_template&utm_medium=email&utm_source=ometria


Note: We’ve named the parameter in this example ‘template_title’, but you can call it anything you like.


Adding tracking parameters at account level (in Ometria)

Tracking parameters for transactional campaigns can also be defined in the Ometria platform at account level.


Note: We still recommend having a logic for the right stream value configured in your API call.


Go to: Account > Settings > Email Settings

Scroll down for the Transactional API panel:

Select ADD under ‘Tracking parameters’ and enter:

  • Your tracking parameter
  • The parameter value

See the list of default tracking parameters for reference.

You can also select a user attribute from the ‘Insert personalisation’ drop-down list. This will populate the required merge tag, allowing you to track attribution specific to the contact who clicks through to those fields.

You can use ‘Insert personalisation’, or you can use any merge tags to include data here.

Select SAVE to finalise your changes.

The parameters defined here will be used if there are no parameters defined in the API request.


Adding tracking parameters for individual transactional campaign types

There are currently no campaign level settings for transactional campaigns in the Ometria platform, but you can add unique tracking parameters to your email links for each campaign type via the stream value in the API request.

To define different tracking parameters for each transactional campaign, you must ensure that:

  • your campaign type or stream value is specified in the API call.
  • you don’t have any URL parameters defined in the API call, OR in the Ometria Email Settings. Either one can override the tracking parameter set for each individual stream.

 

Before you begin, confirm with your development team that different transactional triggers (e.g. a password reset, an order, a return request, a new sign up, etc. ) pass the correct “stream” values in the transactional API request. 

The following is a sample API request that defines a transactional campaign type/stream value - “password reset”:

{
   "data": {},
   "transactional": true,
    "subject": "Password Reset",
    "to": {"name": "John Doe", "email": "customer@example.com"},
    "from": {"name": "Retailer Name", "email": "retailer@retailer.com"},
    "template_ID: 221,
    "sandbox": false,
  "stream": "password_reset",
}

If Ometria receives an API request like the one above, the following tracking parameters replace the default utm_campaign parameter, and are automatically appended to links in the transactional email template sent out:

utm_campaign=omte_password_reset

The stream value sent always replaces the ‘default’ in ‘omte_default’. See default API parameters.

You can then use these tracking parameters to report in Google Analytics or any other similar reporting platform.

Remember:

  • No extra work is needed to define tracking parameters for each transactional campaign.
  • However, the format of all utm_campaign parameter values will be “omte_stream-value” where the stream value is the different type of transactional campaign.

If you don’t currently have the transactional API setup, please contact your customer success manager so they can connect you with the relevant support.