I wanted to know if you guys have a solution to the following issue:
Data need to be sent to two GA properties. First, to a global property, second to the corresponding country-specific property.
Is this done through two GA tags, one global and one that dynamically fetches the country?
Or do we need to set up a tag for every domain and add a load rule to it?
Any help is appreciated!
Solved! Go to Solution.
In our implementation, we use a tag-scoped extension on a single tag to have it run consistently across multiple domains, performing a lookup from domain to site ID. So at most, you'd only need the two tags, one global, and one country/site specific, but it may even be possible to run both trackers off the same Tealium tag (assuming they're both running analytics.js), though that's not something I've had to implement myself..
Hey UnknownJ (or anybody else),
It seems like the extension is not working.
I created a UDO variable to hold the Analytics property ID.
I created a lookup extension searching for the domain. The output is the created UDO variable and the value is the GA property (UA-XXXXXX).
Within the tag, I did a data mapping that the value of the UDO variable overwrites the Tracking ID (tid).
When I am testing the tag through web companion, two GA tags fire, which is fine, however they both send to the same GA property, the global one and not the country specific one.
To be, it seems like the extension is not tied to the tag correctly, even though I set the connected the extension to the tag.
These screenshots show our configuration, you'll see that actually we're running a Before Load Rules extension to set the property ID (and its existence is then used in our load rules to determine whether or not to put Google Analytics on that page), rather than in a tag-scoped extension.
I'd approach this in a slightly different way, if I didn't misunderstood your challenge:
b.ga_account += ',UA-121212-1'; //Global property
My suggestion is keeping the same configuration between countries and global, so it's easier to mantain. If the case is you have free accounts in the countries and the global account has a premium license, maybe you can prioritize the first 20 dimensions.
Maybe another options is doing a rollup or having a global account with views per market.
@UnknownJ Just an FYI, most of our tags include logic to stop the tag firing tracking if the main vendor ID is not provided. In the case of GA, if there is no Tracking ID assigned in the tag, it will do nothing at all. Technically, there is no need for a Load Rule to check if GA ID exists, so you can scope the extension to the GA tag directly.