Skip to main content

Tracking Emails

Tracking Emails necessitates technical expertise and direct access to the codebase. It cannot be implemented through Google Tag Manager (GTM) or any analogous platforms.

Many companies utilize email for marketing, sales, and product-related communications, often using platforms like Mailchimp, Customer.io, or ActiveCampaign. Tracking these emails effectively is crucial for integrating such activities into your customers' journey analytics.

Setting Up Email Tracking

UTM Parameters:
For comprehensive tracking, it's essential to include UTM parameters in all links within your emails. Here’s an example of how to structure these parameters:

https://dreamdata.io?utm_source=newsletter&utm_medium=email&utm_campaign=b2b_revenue_attribution

These parameters ensure that the Dreamdata tracking script can identify and attribute website visits to your email campaigns accurately.

Note on Email Attribution

Dreamdata advises against relying solely on attributions based on email sends or opens, as these are considered weak signals and can lead to over-attribution.

If your email links to a website without your tracking script, the clicks will not be captured in the customer journey. You have two options in such scenarios:

  1. Add the Tracking Script: The preferred solution is to implement the tracking script on the commercial website or landing pages.

  2. Use a Redirect Service: If adding a script isn't feasible—for instance, if it's not your website or if the site doesn't allow custom scripts—you can use a redirect service. This involves creating a redirect page that tracks users before redirecting them to the intended URL. Here’s an example of how Dreamdata handles this:

window.dreamdata.ready(() => {
const getParams = (url) => {
const params = new URLSearchParams(new URL(url).search)
return Object.fromEntries(params)
}

const params = getParams(window.location.href)
const redirectUrl = params.url

if (!redirectUrl) {
return
}

window.location.href = redirectUrl
})

Example: Using the Redirect Script

Scenario

Suppose you send out an email campaign aimed at promoting a new blog post. The email contains a link that should first track the user interaction before redirecting them to the actual blog post.

Email Link

You might use a link like this in your email:

https://yourcompany.com/redirect?url=https://blog.yourcompany.com/new-post

Expected Behavior

Benefits

  • Tracking Before Redirect: This method allows your analytics system to capture data about the user's click from the email before they are redirected to the final URL. This is crucial for understanding the effectiveness of your email campaigns.
  • Enhanced Data Accuracy: By ensuring that the analytics scripts are fully loaded before redirection, you minimize the risk of losing track of user interactions due to scripts not initializing in time.

Advanced URL Parameters

In situations where you need to convey additional information via URL parameters, such as the user’s company identity, consider the following approach:

https://dreamdata.io?dd_group_website=example.com

This URL structure allows Dreamdata to associate the click with a company (e.g., example.com) without requiring personal identification. The user remains anonymous in the customer journey analysis until further identification details, like an email, are provided.