Is it possible to use Google Analytics to track single user account?

前端 未结 4 1920
耶瑟儿~
耶瑟儿~ 2020-12-13 05:08

I\'ve got a website that needs user logged in before they can use, I want to track the behavior of each single user. Is it possible to do this? Any advice? Thanks very much!

4条回答
  •  生来不讨喜
    2020-12-13 05:34

    It's possible via User-ID javascript : User-ID j enables the analysis of groups of sessions, across devices, using a unique and persistent ID

    ga('create', 'UA-XXXX-Y', 'auto');
    ga('set', '&uid', {{ USER_ID }});
    ga('send', 'pageview');
    

    {{ USER_ID }} is a unique, persistent, and non-personally identifiable string ID that represents a user or signed-in account across devices.

    https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id

提交回复
热议问题