Google analytics user explorer get user report

大憨熊 提交于 2019-12-05 20:53:53
Eike Pierstorff

While the latest GA release notes says the client ids have been "surfaced" (i.e. made visible) it is (at least currently) not available as a dimension via the API. So if you want to use it you'd have to add the client id as a custom dimension to your reports yourself. Off the top of my hat this should look something like this:

ga(function() {
  var trackers = ga.getAll();
  trackers.forEach(function(tracker) {
    tracker.set('dimension1',tracker.get('clientId'));
  });
});

Put before the pageview this would write the client id to your custom dimension with the index 1 (which you need to create in advance via the interface in properties->custom definitions). Should also work with multiple trackers on the same page.

This will of course not help you with data that's already been collected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!