How to make Google Tag Manager Analytics tags use

2019-05-24 12:13发布

问题:

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:

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.