未设置Google Analytics自定义维度 [英] Google Analytics Custom Dimension Not Being Set

查看:256
本文介绍了未设置Google Analytics自定义维度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将网站升级为使用Universal Analytics,并试图让一些自定义维度发挥作用。但是,没有自定义维度数据似乎被记录。以下是我的代码示例。

I've recently upgraded our site to use Universal Analytics and am trying to get some custom dimensions to work. However, no custom dimension data appears to be logged. Below is an example of my code.

ga('create', 'UA-XXXXX', 'test.com');
ga('send', 'pageview');
ga('set', 'dimension1', '149377');

在发送综合浏览量之前是否需要设置自定义维度?

Do I need to set custom dimensions before sending pageview?

推荐答案

维度与页面视图或事件一起发送。它不会自己发送。所以你应该切换'发送'和'设置'的顺序,然后在网络中查看页面视图调用,你应该看到维度作为参数之一。

A dimension is sent along with the either a page view or an event. It won't get sent by itself. So you should switch the order of the 'send' and 'set', then look in the network to see the page view call and you should see the dimension as one of the parameters.

请注意,您将在Google Analytics中看到维度数据,并延迟一天左右。

Note that you will see the dimension data in google analytics with a delay of a day or so.

这篇关于未设置Google Analytics自定义维度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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