Google Analytics - Using Client ID as a custom dimension

蹲街弑〆低调 提交于 2019-12-10 16:11:11

问题


Can I use client ID as a dimension in my reports? Client ID does not appear as a dimension in the Dimensions and Metrics Explorer, but I believe I can create a custom dimension that will store the Client ID. My end goal is to have a row per customer/date+time containing the incidents associated with the particular customer at the particular time, e.g. page visits, particular events etc


回答1:


Once you've created the custom dimension in GA, you can start tracking it via analytics.js with the following code:

ga(function(tracker) {
  // Assumes dimension is at index 1.
  tracker.set('dimension1', tracker.get('clientId'));
});



回答2:


I found that the google analytics will NOT save your custom dimension if it matches the value of "client id" (even if that id isn't actually PII). However, if you alter the "client id" to become a different value, it will save properly.

Here are the guidelines about what you are allowed to send



来源:https://stackoverflow.com/questions/40933020/google-analytics-using-client-id-as-a-custom-dimension

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