google-analytics - 自定义报告在 Google Analytics 中为空,从 Google Tag Manager 接收数据

标签 google-analytics google-tag-manager

我想创建一个包含自定义维度和自定义指标的自定义报告,所以我在 GA 中以管理员身份创建了它们,并且两者都有索引 1。

我已将它们添加到代码中的 dataLayer 中:

var dataLayer = {'dimension1':'Custom Dimension 1','metric1':123456}

在 GTM 中设置后,我检查了数据是否在实时模式下发送:

enter image description here

但自定义报告为空,但正在注册现场事件。

enter image description here

这是我网站的全部代码。我已尝试添加 Google 跟踪代码管理器和 Google Adwords 代码,但在任何情况下都不起作用:
<body>
<script>
var dataLayer = [{
    'dimension1':'My Custom Dimension 1',
    'metric1': 123456
}]
</script>
    <!-- Google Tag Manager -->
    <!-- End Google Tag Manager -->
<h1>Nuevo alojamiento</h1>
<script>
    //GA CODE

    ga('create', 'UA-76206495-2', 'auto');
    ga('send', 'pageview');

</script>
</body>

最佳答案

将具有这些标准引用名称的这些值推送到 GTM 不会将它们与您的匹配项相关联,也不会使它们显示在您的报告中。在 GTM 中,您需要从 dataLayer 中获取 CD 和 CM 的值。在这种情况下,您需要创建 dataLayer 类型变量,以便您可以访问 dimension1。和 metric1 ,尽管我建议将它们重命名为标准 GA 引用名称以外的其他名称,即。 dimensionX 和 metricX 因为这可能会造成混淆。然后,您需要使用这些新名称将该 CD 和 CM 的索引和值传递到任何标签(页面 View 、事件等)。

编辑:请注意,数据在处理之前不会显示在您的标准报告中,这最多需要 24 小时左右。

关于google-analytics - 自定义报告在 Google Analytics 中为空,从 Google Tag Manager 接收数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36676580/

相关文章:

google-analytics - Google跟踪代码管理器-增强型电子商务和Ajax

javascript - 带有 Comodo SSL 可信站点印章的 Google 标签管理器

Angular + 谷歌分析 : tracking page views with the new analytics

php - Google Analytics _trackEvent 不适用于 XHTML?

google-analytics - Google Analytics _ga参数-跨域

node.js - Nodejs错误: "User does not have sufficient permissions for this profile "

Javascript - 获取 Google 跟踪代码管理器点击链接的图像替代文本

android - Google 跟踪代码管理器抛出 "invalid macro"消息

javascript - 带条件的 GTM 清理标签

javascript - Google Analytics 中的虚拟综合浏览量取代真实综合浏览量