在Google Analytics从Google跟踪代码管理器接收数据时,自定义报告为空 [英] Custom reports are empty in Google Analytics receiving data from Google Tag Manager

查看:251
本文介绍了在Google Analytics从Google跟踪代码管理器接收数据时,自定义报告为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个包含自定义维度和自定义指标的自定义报告,因此我在GA中创建了它们作为管理员,并且都具有索引1.

I want to create a custom report with custom dimensions and custom metrics, so I've created them as admin in GA and both have index 1.

我在代码中的dataLayer中添加了它们:

I've added them in the dataLayer in my code:

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

在GTM中设置后,我已经检查过数据是否正确发送模式:

And after setting in GTM, I've checked data is being sent right in live mode:

但是自定义报告是空的,但现场活动正在注册。

But custom reports are empty, but activity on site is being registered.

这是我网站的完整代码。我曾尝试添加Google跟踪代码管理器和Google Adwords代码,但无论如何都无效:

This is the entire code of my site. I have tried adding both Google Tag Manager and Google Adwords codes but does not work in any case:

<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的索引和值传递到使用这些新名称的标记(页面视图,事件等)。

Pushing those values with those standard reference names in to GTM will not associate them with your hits, or make them show up in your reports. In GTM you need to grab the value of your CD and CM from the dataLayer. In this case you need to create dataLayer type variables that will give you access to dimension1 and metric1, although I would advise to rename them to something else other than the standard GA reference names, ie. dimensionX and metricX because that could be confusing. Then you need to pass the index and value for that CD and CM into whichever tag (page view, event, etc.) using those new names.

编辑:请注意数据不会在标准报告中显示出来,直到它们处理完毕,最多需要24小时。

note that data won't show up in your standard reports until they have been processed, which takes up to 24 hours or so.

这篇关于在Google Analytics从Google跟踪代码管理器接收数据时,自定义报告为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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