Search code examples
google-tag-managergoogle-analytics-4

Is it possible to connect one GTM container to three GA4 properties?


I need to connect one GTM container to three GA4 properties:

Property 1: test.mydomain.com

Property 2: mydomain.com - this is a new GA4 property, as the site is relaunching

Property 3: mydomain.com - this is an existing GA4 property. Once the site relaunches I want the data to continue tracking in the existing account to make YoY reporting possible.

Currently, I am using a regex variable within the Google Configuration tag to connect GTM to Properties 1 & 2. However I cannot work out how to connect Property 3, as Properties 2 & 3 use the same url.

enter image description here


Solution

  • What you're looking at in your screenshot is a simple router. You can add more rules to it and your rules don't have to be domain-specific. You can have them url-specific too, but in that case you'd have to have them before the domain rule otherwise it'll overwrite the page-specific rules.

    If you need more than one property to fire on the same url, you would have to make another set of rules, but when setting the property in them, you would either hardcode it there or use a different variable.