Add custom link tracking parameters to email messages

You can add link tracking parameters to all links in both campaign and journey email messages to help you better track performance and subscriber actions.

For example, you can add a link tracking parameter like event=holiday_sale to a campaign message announcing a holiday sale to differentiate it from other kinds of campaign messages, like those for newsletters or product announcements.

In addition to freeform text, you can also use variables like {{message.messageId}} as values in link tracking parameters.

Add a link tracking parameter to an email message

  1. Create or edit a text message in a campaign or journey.
  2. For campaigns, click Add or Edit in the Email details section for the message you want to add parameters to. For journeys, click the Send email step for the message you want to add parameters to.
  3. Under Link tracking, click + Add a custom link parameter.
  4. Enter a parameter Name and Value. For example, to add a parameter to track an email message for a holiday sale, enter event as its Name and holiday_sale as its Value.
    1. In addition to static values, you can also add variables, like {{subscriber.email}}. Click { } to add a variable.
    2. If Enable Google Analytics Link Tracking is turned on, the UTM campaign (optional) field appears and is prepopulated with a value, which you can change.
    3. You can combine freeform text and multiple variables in a value. For example: holiday_sale_{{message.messageId}}_{{message.messageName}}
  5. (Optional) Click + Add custom link parameter to create additional parameters.
  6. (Optional) Click the X next to a parameter to remove it.
  7. Click Save.

Animation showing creation of a link tracking parameter for an email message for a seasonal campaign.

Add variables to link tracking parameters

In addition to static values, you can also add variables to link tracking parameter values. This allows you to track performance of specific messages and by individual subscribers.

The following variables are supported:

Variable Description
{{message.messageId}} The individual ID of the message in Attentive that this parameter is appended to.
{{message.messageName}} The name of the message at send time in Attentive that this parameter is appended to.
{{message.messageType}} The type of message this parameter is appended to (concierge, marketing, or transactional).
{{subscriber.email}} The email address of the subscriber an individual message was sent to.
{{subscriber.emailHash}}

A hashed (SHA-256) version of the subscriber’s email address. This is a secure way to provide email identifiers without exposing personally identifiable information.

{{subscriber.userIDHash}} A hashed (SHA-256) version of the subscriber’s user ID. This is a secure way to provide user IDs without exposing personally identifiable information.

For example, a text message is sent with the following link tracking parameters:

Name Value
event holiday_sale
id {{message.messageId}}
email {{subscriber.email}}

If the messageID is 1234567 and the subscriber’s email address is firstname@test.com, then the URL will look like this:

https://www.yoursite.com?utm_medium=sms&utm_source=attentive&event=holiday_sale&id=1234567&email=firstname@test.com

Add link tracking to different links in the same email message

With custom link tracking at the message level, custom link tracking parameters and values are applied to all links in a message.

For example, if you send a campaign message with two links, and the global default utm_campaign value is spring_campaigns, that value is appended to both links.

If you want to differentiate between multiple links in the same message, you can manually add link tracking parameters and values to those links. Here’s how to manually add link tracking parameters to links in text messages:

  • Click on the first link in the message composer.
  • In the Link URL field at the top of the Edit short link window, type the parameter and value you want to use at the end of the URL, e.g.: ?utm_term=link1
  • Click Update shortlink.
  • Repeat steps 1–3 for additional links, using a new link tracking value for each link, e.g.: ?utm_term=link2.

The ‘Edit short link’ window for a link in a campaign text message
  with a manually added link tracking parameter added to the URL and highlighted
  in the ‘Link URL’ field.

And here’s how to manually add link tracking parameters to links in email messages:

  • Open the email message in the email editor.
  • Click on the first link in the email.
  • Click the link icon.
  • In the Url field in the Insert link window, type the parameter and value you want to use at the end of the URL, e.g.: ?utm_term=link1
  • Click OK.

Repeat steps 2–5 for additional links, using a new link tracking value for each link, e.g.: ?utm_term=link2.

The ‘Insert link’ window for a link in an email message with a manually added link tracking parameter added to the URL and highlighted in the ‘Url’ field.

Notes

  • If you manually add a link tracking parameter that already exists at the global or message level, Attentive automatically identifies and removes duplicate tracking parameters.
  • You can’t manually add parameters to links that include variables (e.g., {{subscriber.userIdHash}}) in the URL.

Articles in this section

Was this article helpful?
0 out of 0 found this helpful