如何在本地地址上使用Google Analytics和Google跟踪代码管理器2? [英] How to use Google Analytics and Google Tag Manager 2 on a local address?

查看:110
本文介绍了如何在本地地址上使用Google Analytics和Google跟踪代码管理器2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对GTM比较陌生,并且一直在尝试使用新界面,该界面将于4月1日完全取代原始界面: https://support.google.com/tagmanager/answer/4605576

然而,我遇到了一些问题Google Analytics在本地地址上进行测试时注册浏览量。有一个使用这里概述的原始GTM布局的解决方案:
在Google跟踪代码管理器中跟踪Google Analytics中的本地主机,所以我不想问一个重复的问题。但是,在新的Google跟踪代码管理器设计中,不再有将Cookie网域设置为无的选项,那么我现在如何从本地地址测试Google Analytics和GTM?

解决方案

如果您转到要设置的字段,请点击添加新字段并开始在字段名称输入框中输入autosuggest函数将建议适用的字段名称(即,如果您开始输入coo,它会提示与cookies相关的所有内容,包括cookie域)。 幕后花絮GTM一直使用领域机制,现在已经在界面中明确了这一点。但是这对GA跟踪的工作方式有所不同,所以只需将set field - >cookieDomain设置为none,一切都将像以前一样工作。


I'm relatively new to GTM and have been experimenting with the new interface which will be fully replacing the original on 1 April: https://support.google.com/tagmanager/answer/4605576.

However, I have encountered some issues getting Google Analytics to register pageviews when testing on a local address. There is a solution for this using the original GTM layout outlined here: Track localhost on Analytics in Google Tag Manager, so I don't wish to ask a duplicate question. However, in the new Google Tag Manager design there is no longer an option to set Cookie Domain to 'none', so how could I now test Google Analytics and GTM from a local address?

解决方案

If you go to "fields to set", click on "add new field" and start typing into the "field name" input box the autosuggest function will suggest applicable field names (i.e. if you start typing "coo" it will suggest everything related to cookies, including the cookie domain).

"Behind the scenes" GTM has always used the "set fields" mechanism of GA, this has now been made explicit in the interface. But this does make a difference to the way GA tracking works, so simply "set field"->"cookieDomain" to "none" and everything will work like before.

这篇关于如何在本地地址上使用Google Analytics和Google跟踪代码管理器2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆