在 Google Tag Manager 中的 Analytics 上跟踪 localhost [英] Track localhost on Analytics in Google Tag Manager

查看:32
本文介绍了在 Google Tag Manager 中的 Analytics 上跟踪 localhost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 Google 标签管理器在本地主机上跟踪 Google Analytics 时遇到问题.我可以在用于分析的 API(https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#localhost),我需要做的就是将 cookieDomain 设置为 none.我在 Google 标签管理器中没有找到这个选项.有人知道怎么做吗?

I have a problem with tracking Google Analytics on localhost with Google Tag Manager. I can see on the API for Analytics ( https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#localhost), all i need to do is to set cookieDomain to none. I do not find this option in Google Tag Manager. Does anyone know how to do this?

推荐答案

引用它的文档是关于 Universal Analytics(新的 GA API 版本).

The documentation referenced it is about the Universal Analytics (new GA API version).

要解决这个问题,您有两个选择:

To solve this problem, you have two options:

1) 使用传统标签Google Analytics",在更多设置">域和目录">域名":

1) Using the traditional tag "Google Analytics", in 'More settings' > 'Domains and Directories' > 'Domain Name':

none

2) 或者在 Tag Google Manager 中切换到Universal Analytics"标签,配置必填字段,然后在更多设置">Cookie 配置">Cookie 域":

2) Or switch to the "Universal Analytics" tag in Tag Google Manager, configure the required fields and in 'More settings' > 'Cookie Configuration' > 'Cookie Domain':

none

在这两种情况下,都应该在网站启动前关闭这个选项.

In both cases, this option should be turned off before the launch of the site.

这篇关于在 Google Tag Manager 中的 Analytics 上跟踪 localhost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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