简体   繁体   中英

Google Analytics - Custom Variable combine with User ID

I want to send out newsletters which are linking to my website. On my website, all content except the landing page from the NL is protected by authentication login.

I want to build a detailed customer journey for all recipients and all logged in website users.

I think I will need the following two things: 1. Custom Variable for the NL with an individual ID 2. User ID for the authentication login

Am I right? AND, the most important thing, how can I combine this two values correctly?

Please note: I don't want to analyze personal information as it's not allowed in GA. But what I want to do is that the data from GA is exported via the GA API to Tableau to make reports for every user. Do you think I could make this in that way?

The userID is not a queryable dimension . Probably what you want to do is create a user scoped custom dimension .

You can send in a custom dimension as follows:

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

ga('send', 'pageview', {
  'dimension15':  USER_ID + NL
});

And then you can query the custom dimension with the Core Reporting API with dimensions=ga:dimension15 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM