Highlighted

Event Tracking is disabled when Google Analytics is deployed with Load Rule

Bronze Contributor
Bronze Contributor

Hello, 

We have always deployed Google Analytics on All Pages. But lately we want to structure our website to feed different data to Google Analytics based on the domain/projects. I recently tried to deploy Google Analytics and add a Page Load rule that looks at the utag_data.project variable. And based on the variable loads a specific instance of Google Analytics. 

The problem we are facing though, as soon as you activate Load Rule for Google Analytics, the event tracking gets disabled. 

Is that a known concern? Is it a bug? Is there a workaround? Why does it happen?

Does anyone have any details on the questions above, please let us know. This has been causing some many issues for us :) 

 

Thank you

R

Good data in is Better data out
5 REPLIES 5
Highlighted

Event Tracking is disabled when Google Analytics is deployed with Load Rule

Silver Contributor
Silver Contributor

Hi @irraghav7, welcome to the TLC!

It looks to me as if you've got scoping issues, and you're trying to set the rule based on a variable that isn't yet defined. 

Is it possible for you to set up the load rule for the GA tag to look at the URL instead? You can then set up a Lookup Table extension mapped to the Google Account ID to set the UA-xxx string based on URL as well.

Screen Shot 2020-09-24 at 10.05.05 am.png

Highlighted

Event Tracking is disabled when Google Analytics is deployed with Load Rule

Bronze Contributor
Bronze Contributor

Thanks for responding Christopher. This does seem like a very sound assessment of the issue. I can definitely try that. The problem I am facing though, the organization has a very complicated structure, and there is a one-project to many-domains implementation. So, www.company.com/main and www.company.com/sub-page will be have utag_project="host" and utag_project="exchange". 

Now multiple that over 50+ domains and hundreds of pages over the last 10 years, so I might not even know where some pages are. 

Thank you

R

 

Good data in is Better data out
Highlighted

Event Tracking is disabled when Google Analytics is deployed with Load Rule

Bronze Contributor
Bronze Contributor
Not sure who put this as solved, because I am still trying to figure it out.
Good data in is Better data out

Event Tracking is disabled when Google Analytics is deployed with Load Rule

Gold Contributor
Gold Contributor

Hi @irraghav7 ,

Could you please have a look, when you fire utag.link call,  the UDO variable which you have given in the load rule is getting populated with the call ?

You could use document.cookie='utagdb=true' to check the variables getting populated in the 'b' data object.

 

Thanks

 

Its Not Who I am Underneath, but What I Do That Defines Me
Highlighted

Event Tracking is disabled when Google Analytics is deployed with Load Rule

Bronze Contributor
Bronze Contributor

Thanks Dragooon, 

This is the right solution, apparently. 

GA is meant to be set as a global tag on all pages (best practice). But, As we are adding load condition and the value is being picked from the data layer, we have to make sure that the utag.link payload contains the load condition values. That is the only way it will work. 

R.

Good data in is Better data out