Identify the same user in Google Analytics when use a Webapp and a desktop client (with measurement protocol)

旧城冷巷雨未停 提交于 2019-12-13 08:41:51

问题


I have an mixed application, where a part is a WebApp and a part is a desktop client. I track the user with google analytics. On the desktop client, i do this with the measurement protocol.

Now, the problem is, that in Google analytics, I see the usage of both parts, but a user is identify not as the same, when it use the web app and the desktop client.

Is there an option, in the measurement protocol, to identify the user, that google analytics can match it to the webapp user and knows that it is the same user?


回答1:


You can enable the User ID in Google Analytics, however you'll need to do the detection yourself.

If your users have a sign-in of some kind, you can just use their ID and pass it to Google Analytics. If your users do not sign in, you will need to manage it via some kind of fingerprinting yourself and assign an ID.

Here is some more info from the GA documentation.

ga('create', 'UA-XXXXX-Y', 'auto', {
  userId: USER_ID
});
ga('send', 'pageview');

I've never used this for cross-device user tracking, so I can't say how it will affect certain reports such as Device.



来源:https://stackoverflow.com/questions/44974158/identify-the-same-user-in-google-analytics-when-use-a-webapp-and-a-desktop-clien

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