How to make Google Tag Manager Analytics tags use the DEFAULT tracker?

五迷三道 提交于 2019-12-07 23:51:33

问题


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.



来源:https://stackoverflow.com/questions/18634729/how-to-make-google-tag-manager-analytics-tags-use-the-default-tracker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!