Skip to main content
How to handle link tracking in emails?

Batch provides a highly flexible way of tracking clicks on links. Here are the three available options for this feature.

Cindie avatar
Written by Cindie
Updated over 2 months ago

Batch gives you a highly adaptable method for individually monitoring the clicks on links, and displays detailed statistics for each campaign or email automation sent.

These allow you to track generic indicators (e.g. click-through rate), but also to see in detail the clicks on each of the links in your e-mails, so you can understand which part of your message converts best and optimize your content (e.g. clicks concentrated on the unsubscribe link or the buy button).

On the Dashboard, you can see both the generic clicks indicator and the list of links for each of your email campaign/automation analytics๐Ÿ‘‡

Batch offers 3 different ways to track clicks, depending on your use case:

  • Track clicks separately, per URL.

  • Group clicks on similar links under a "link name".

  • Disable the click tracking for one or several URLs.

These three options are here to cater to different scenarios and needs, giving you the flexibility you require to accurately understand and interpret your data.

Default click tracking

By default, Batch will track clicks on all the URLs of your email. The raw clicked URL will be displayed in the campaigns analytics ๐Ÿ‘‡

While easy to use, this method is unsuited for personalized links that contain personal/sensitive data, or e-mails that contain links unique for each user (e.g. a single-use promocode, a password reset token, etc). These URLs would be exposed in the campaign analytics.

Grouped link tracking

Allows you to group the click tracking behind a "link name" defined by you while editing the email template (e.g. "social_networks" for your social network links in the footer of your email) ๐Ÿ‘‡

It is suitable for personalized links to avoid having too many raw personalized links in the stats or links that don't have enough value to be tracked individually.

Here are several cases where using a link name tracking is useful:

  • Privacy & Double opt-in automations: Attaching a link name to URLs in your email (e.g. validation_url) is the best solution if you don't want to expose raw personalised URL in the campaigns analytics, but still want to track clicks on these links.

  • Deduplication of URLs with personalization: A single link with a personalization variable that changes for each user (e.g. https://website.com/?promocode={{unique_code}}) will result in hundreds/thousands of different links tracked for the same URL in the template. Using a link name โ€œredeem_linkโ€ to track all the clicks on that link on the template is a better option.

  • Grouping of similar links: Here, you can group similar links to gain visibility on the type of links clicked by users.

  • Tracking separately the same link:

    • Why? If you have several times the same URL in your email, Batch will attribute all the clicks to a single URL in the campaigns analytics. While this is great to have a synthetic view on which URLs were clicked, this can be an issue if you want to know from where the clicks are coming (e.g. from the URL in the headers, or from the same URL but in the body of the email).

    • How?ย Use a different link name for the same URL, according to where the URL is placed (e.g. mylink_body) and use a different one for the same link, placed in the footer (e.g. mylink_footer). In the campaigns analytics, you will be able to measure the distribution of clicks on that specific link, based on where it has been placed in the email.

To attach a link name to a URL in your email, simply add a data-msys-linkname="NAME" parameter to the <a> html tag of the link:

<a data-msys-linkname="NAME" href="[URL]">My link</a>

Replace NAME with the link name you want to use. Link names have a maximum length of 63 characters and are truncated if they exceed the limit.

Disabled click tracking

Allows you to disable completely link tracking if you want to avoid showing links in Batch analytics with personal/sensitive data (e.g. a password reset token, etc), or if your links are unique for each users and don't want to have thousands different entries in the analytics or for any technical reasons (e.g. universal link support).

Lastly, you may need to disable click tracking on a specific link, and this option is suitable for cases where no click is to be tracked.

It applies to these two cases mainly:

  • Privacy & confidential links

  • Universal links

To implement this, you only need to add a data-msys-clicktrack="0" parameter to the <a> html tag of the link:

<a data-msys-clicktrack="0" href="[URL]">My link</a>

Link tracking cannot be disabled for a whole template, the option is only available at each <a> level.


This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.


Did this answer your question?