How to Set Up a GA4 Roll-Up Property with Google Tag Manager

How to Set Up a GA4 Roll-Up Property with Google Tag Manager

Multiple GA4 Properties

Introduction

Tracking user behaviour across multiple websites is crucial for businesses, Google Analytics 4 (GA4) offers a solution through its roll-up property feature. This blog post aims to guide you through the process of setting up a roll-up property in GA4 using Google Tag Manager (GTM). You can either watch the video tutorial below or continue reading for a step-by-step guide.

Creating a GA4 Roll-Up Property

  1. Navigate to GA4: Open your GA4 account and create a new property. This will be your roll-up property.
  2. Name the Property: Give it a descriptive name, such as Roll-up Property, so that users can easily identify it.
  3. Copy Measurement ID: Once the property is set up, go to ‘Data Streams’ and copy the ‘Measurement ID’.

Creating a Duplicate Google Tag in GTM

  1. Open GTM: Go to your Google Tag Manager account and create a new workspace.
  2. Duplicate the Tag: Click the three dots next to the Google Tag and select ‘Duplicate’.
  3. Rename the Tag: Give the duplicated tag a new name to indicate it’s for the roll-up property.
  4. Update Measurement ID: Change the ‘Measurement ID’ in the duplicated tag to the one you copied from your GA4 roll-up property by creating a new variable. If the site only has one environment, you can create a Constant variable and past the Measurement ID into the variable.

Setting Up Cookies

  1. Add Cookie Prefix: In the duplicated tag, add a new parameter called ‘cookie_prefix’.
  2. Set Prefix Value: Assign the value ‘roll-up’ to the ‘cookie_prefix’. This ensures that the cookies for the roll-up property are distinct from your main property.

Duplicating Event Tags in GTM

  1. Find Event Tag: In the same GTM workspace, locate the event tag you want to duplicate.
  2. Duplicate the Tag: Click the three dots next to the event tag and select ‘Duplicate’.
  3. Rename the Tag: Give the event tag a new name to indicate it’s for the roll-up property.
  4. Update Measurement ID: Change the ‘Measurement ID’ to the one you copied from your GA4 roll-up property.

Configuring Cross-Domain Tracking

  1. Go to GA4 Roll-Up Property: Navigate back to your GA4 roll-up property.
  2. Configure Domains: Go to ‘Data Streams’ and click on ‘Configure Domains’. Add all the domains you want to track.

Testing Your Setup: A Deep Dive

GTM Preview Mode

  1. Activate Preview Mode: In GTM, activate the preview mode to test your setup before publishing.
  2. Check Events: Make sure that both the normal and roll-up page view events are firing. You should see these events in the GTM preview pane at the bottom of your website.
GA4 Roll-Up property

Chrome Developer Tools for Cookie Inspection

  1. Open Developer Tools: Right-click anywhere on your website and select ‘Inspect’ to open Chrome Developer Tools.
  2. Navigate to Application Tab: In the Developer Tools, go to the ‘Application’ tab.
  3. Check Cookies: Here, you’ll see a list of cookies. Look for cookies with the ‘roll-up’ prefix to ensure that your cookie prefix setup is working.

Chrome Developer Tools for Event Inspection

  1. Go to Network Tab: Still in Chrome Developer Tools, switch to the ‘Network’ tab.
  2. Refresh the Page: Refresh your website page to trigger the events.
  3. Check Measurement IDs: In the ‘Network’ tab, you should see network requests with different measurement IDs. These IDs should match the ones you’ve set up for your main and roll-up properties.
  4. Inspect Payloads: Click on these network requests to inspect their payloads. You should see ‘page view’ events for both measurement IDs, confirming that events are being sent to both properties.

By following these steps, you’ll ensure that your roll-up property is not just set up correctly but is also capturing data. This comprehensive testing using GTM Preview Mode and Chrome Developer Tools is crucial for confirming that your setup is flawless.

And there you have it! A comprehensive guide to setting up a roll-up property in GA4 using GTM. This allows you to aggregate data from multiple sites into one property, making it easier to analyse user behaviour across platforms.

You can read more of our blogs here.

More reading

ChatGPT+ Avian GA4 Plugin

How to Use Google Analytics 4 for Form Analytics: A Step-by-Step Guide

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *