Google Analytics多追踪帐户维度数据部分未在报告中显示 [英] Google Analytics multi tracking account dimension data partially not showing in report

查看:110
本文介绍了Google Analytics多追踪帐户维度数据部分未在报告中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个Google Analytics跟踪帐户。

  var ga1 =UA-XXXXXX-1; 
var ga2 =UA-XXXXXX-2;

然后创建对象并发送页面视图。

  ga('create',ga1,'auto'); 
ga('send','pageview');
ga('create',ga2,'auto',{'name':'second'});
ga('second.send','pageview');

然后在对象中设置dimension1并再次发送页面视图。 b

  ga('set','dimension1','mytown'); 
ga('send','pageview');
ga('set','dimension1','mytown',{'name':'second'});
ga('second.send','pageview');

然后我在Google Analytics上查看结果。


  1. ga1和ga2帐户都可以使用实时报告检测到网站上有活跃的用户。 (例如:当前活动用户= 1)
  2. 但是,只有帐户ga1可以记录自定义报告上收到的维度1值。 ga2上同一维度的自定义报告为空。

为什么?有人可以指出我的代码错在哪里吗?

这是合并的代码。

  var ga1 = UA-XXXXXX-1; 
var ga2 =UA-XXXXXX-2;

ga('create',ga1,'auto');
ga('send','pageview');
ga('create',ga2,'auto',{'name':'second'});
ga('second.send','pageview');

ga('set','dimension1','mytown');
ga('send','pageview');
ga('set','dimension1','mytown',{'name':'second'});
ga('second.send','pageview');

谢谢!

解决方案

我认为问题可能在这里:

  ga('set','dimension1','mytown ',{'name':'second'}); 

当您设置dimension1时,如果您需要在方法前加上第二个跟踪器的名称正在尝试为第二个跟踪器设置维度。



所以它应该是

  ga('second.set','dimension1','mytown'); 


I have two google analytics tracking account.

var ga1 = "UA-XXXXXX-1";
var ga2 = "UA-XXXXXX-2";

I then create the object and send the page view.

ga('create', ga1, 'auto');
ga('send', 'pageview');
ga('create', ga2, 'auto', {'name': 'second'});
ga('second.send', 'pageview');

I then set dimension1 in the object and send the page view again.

ga('set', 'dimension1', 'mytown');
ga('send', 'pageview');
ga('set', 'dimension1', 'mytown', {'name': 'second'});
ga('second.send', 'pageview');

And then I view the result on Google Analytics.

  1. Both ga1 and ga2 account can detect that there's a user active on the site using real time report. (e.g.: current active user = 1)
  2. But, only account ga1 can record that there's a dimension1 value received on the custom report. The custom report for the same dimension on ga2 is empty whatsoever.

Why? Is there someone can point me where my code is wrong? Thanks.

This is the combined code.

var ga1 = "UA-XXXXXX-1";
var ga2 = "UA-XXXXXX-2";

ga('create', ga1, 'auto');
ga('send', 'pageview');
ga('create', ga2, 'auto', {'name': 'second'});
ga('second.send', 'pageview');

ga('set', 'dimension1', 'mytown');
ga('send', 'pageview');
ga('set', 'dimension1', 'mytown', {'name': 'second'});
ga('second.send', 'pageview');

Thanks!

解决方案

I think the problem may be here:

ga('set', 'dimension1', 'mytown', {'name': 'second'});

When you set dimension1, you need to prefix the method with the name of the second tracker, if you are trying to set the dimension for the second tracker.

So it should be

ga('second.set', 'dimension1', 'mytown');

这篇关于Google Analytics多追踪帐户维度数据部分未在报告中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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