Email Tracking in Google Analytics 4

Using your TrackFunnels generated pixels

This feature is available for
  • 🚀 Pro Plan subscribers

Table of Contents:

This guide is designed to assist you in setting up your account for generating email tracking pixels. In this setup guide, you will learn about:

1. Change in your account settings

Before diving into the pixel builder, you'll need to fill out some details on these tabs to connect your GA4 and email platform. It's a straightforward process, and it's important for making sure everything works smoothly.

When you upgrade, you'll notice three new tabs in your account settings—each designed to get you set up and ready to go:

  1. All Email Pixels: This is your Pixels Dashbaord where you can find all the pixels you've generated so far.
  2. Email Tracking Pixel Builder: This is the form builder where you can create your email pixels.
  3. Set Up GA4: To get your Google Analytics 4 linked up.
  4. Email Tracking Settings: To set up your email marketing platform for fine-tuning how you track the email opens.
Important Notice 🚨

Make sure you have the green light to track email opens. It’s good practice to let your email recipients know what you’re doing with a clear heads-up—this helps keep everything above board and avoids any legal snags. Remember, while we handle the data processing and can sign a Data Processing Agreement (DPA) if you need one, you should definitely touch base with your legal advisor, especially if you're in the European Economic Area, to make sure everything is in tip-top legal shape. We're here to help with the tech, but the privacy policy part is on you!

2. How email opens are tracked

Always a good idea to familiarize with basic technicalities of the process 🤖. Here it is:

Understanding the Measurement Protocol

Email opens are unique interactions that don't occur directly on your website, which is why the usual GA4 or GTM tracking codes can't capture them. Instead, we use the Measurement Protocol. This approach treats email opens as "offline" interactions, so each hit starts a new session and creates a new user* in your GA4—this will be clarified further on.

How is it different from Universal Analytics

If you're familiar with how the Measurement Protocol functioned with Universal Analytics (UA), you'll find that it's been significantly updated for GA4. The UA version of the Measurement Protocol primarily utilized a tracking ID and did not require an API secret key. We were able to send data to Google Analytics by constructing a URL with the appropriate parameters. GA4’s Measurement Protocol now requires an API secret key for the same task.

This change enhances security as the API secret key is used to authenticate data sent to Google Analytics. While there are more differences, the use of the API secret key is the primary change relevant to us. For a deeper dive into the GA4 Measurement Protocol, we recommend looking at the developer documentation.

Traffic Attribution in GA4 Measurement Protocol

Currently, the GA4 Measurement Protocol doesn’t support the passing of UTM parameters with each hit 😮. Instead, we use additional event parameters to relay campaign-related information from your emails to your GA4 account. This ensures that you still receive valuable insights about where your traffic is coming from and how your campaigns are performing.

In order to report on these attribution parameters, you'll have to set them up as custom dimensions, just like other event parameters.

3. Set up your TrackFunnels account

Before you dive into creating pixels for email tracking, it's crucial to get your account properly set up. Follow these straightforward steps to ensure everything is in order:

Step 1: GA4 Setup

Go to "Set Up GA4" tab in your TrackFunnels Account Settings and update the required fields.

  • Add Your GA4 Stream Name, Stream URL and Measurement ID: You can get all three by going to your GA4 account > Admin > Data Streams.
  • Generate an API Secret Key: In the same screen scroll down to Measurement Protocol API secrets. In the next screen, you'll see a Create button and a blank window if you haven't create this before. Click "Create", give it a nickname (this is just for your own identification) > click Create button again. Your secret key will be generated. Copy this key to add in your TrackFunnels Account Settings.
Step 2: Email Platform Settings

Go to "Email Tracking Settings" tab in your TrackFunnels Account Settings.

These settings are related to the email platform you use and will determine the data quality of your tracking. Please be very careful when setting this up.

  1. Email Marketing Platform: Enter the name of your email marketing platform. Make sure to use its well-known name. This entry will automatically convert to lowercase when saved.
  2. Personalization Tag for Contact ID: This tag is crucial for associating opens with specific users and is a required field. If you're unsure where to find this for your platform, contact their technical support or, as a last resort, reach out to us.
  3. Exclude Domain: Enter the domain where you manage your email settings, not the domain of the email marketing platform itself. For example, while ActiveCampaign's domain is, the domain used within your account might be
  4. GA4 Client ID Personalization Tag: Although optional, this tag is important for linking email events back to specific users by using the GA4 client ID. If you record the GA4 client ID in your email platform, include this tag to avoid creating new users with each event.

Congratulations 🎉🎈 Your Pixel Builder is now ready to use but continue reading to know how to use it!

Using the Pixel Generator Form

The Pixel Generator Form is designed to be user-friendly and adaptable, featuring several fields that allow you to tailor how events are tracked in your GA4 account. Don't worry if you're unsure about any field; helper links are available at each step to guide you and explain the details.

Event Creation and Tracking

Whenever someone opens an email, this action is recorded as an event in GA4 via the Measurement Protocol. Please note that there might be a slight delay in data reporting as we batch hits to conserve resources.

Naming Events

There are specific rules for naming events and parameters in GA4. While we've implemented form validations to adhere to these standards, it's a good idea to familiarize yourself with these rules yourself here.

Managing Pixels

After you generate a pixel, it will be saved automatically to your Pixels Dashboard. You cannot edit a pixel once created, but you can delete it if necessary.

How Events Show Up in GA4

We advise against using too many unique event names for your emails. To keep things simple, every event you track will include a default parameter named email_status with the value open. You might choose a general event name like email_performance to encompass both opens and clicks.

Available Parameters

To cover all possible scenarios we have 13 paramaters available with each email event. This is well below the GA4 limit of 25.

We've provided space for parameters based on their usage. Here are all the parameters you'll be able to use:

  1. Parameters to identify which email is opened
    • email_subject
    • email_content
    • email_status (This is a parameter with constant value of 'open')
  2. Parameters to identify who opened the email and when
    • email_contact_id
    • email_open_time
  3. Parameter to identify the traffic source of the email campaign
    • email_attribution_campaign_id
    • email_attribution_campaign
    • email_attribution_source
    • email_attribution_medium
    • email_attribution_term
    • email_attribution_content
  4. A bonus parameter
    • email_extra_param (to cover any use cases not covered here)

Setup Inside Your GA4 Account

Now that you have started to create pixels and collecting data, it is time to set the event parameters in your GA4 account to make full use of them and utilize the Explorer reports.

Create custom dimensions

In order to do this, its advisable to create a custom dimension per event parameters that you send in your emails. Once you have set up the custom dimensions your parameters can be easily used to run your analysis.

And that’s it! You now know how to track email opens in your GA4 account :)

Happy tracking! 🎸