How to make Google Tag Manager Analytics tags use

2019-05-24 12:19发布

The analytics tags defined in GTM (not using a custom HTML tag for analytics) seem to have their own tracker.

I have _gaq.push() based configuration (some custom variables) in my web page in the rendered html.

And this configuration is applied to the default tracker.

GTM on the other hand defines its own tracker with random name (its actually a number) and all configuration done in the GTM web GUI is applied on that custom named tracker.

How do I make GTM use the default nameless tracker, so that my configuration holds true even from GTM GA tags?

You can look at tracker list and names by doing a _gat.<x> on a page where GA is loaded. is usually p or C or some such minified variable. You might also use _gat.getTrackers()

1条回答
做个烂人
2楼-- · 2019-05-24 13:03

I think I understand what you are saying. If I'm wrong, let me know.

Although it's discouraged to name your trackers in GTM, you can do it by going to the Google Analytics Tag (in GTM) and go to More Settings > Advanced Configuration > Tracker Name. Check the Tracker Name and leave it blank, and click Save.

Tracker Name for GTM

查看更多
登录 后发表回答