Sean2013
Sean2013

Reputation: 3

Setting up User ID string using Google Analytic Universal Code

We have some devices with Unique browser string created and installed on them. We want to be able to track this devices in Google Analytic using Google Tag Manager. I know this is possible using the Google Tag Macro but i am not sure what Variable to pass when creating the macro. The old way we do this is:

ga('set', '&uid', {{ USER_ID }});
ga('send', 'pageview');

I am just not sure how to pass the user ID string in Tag manager.

Upvotes: 0

Views: 420

Answers (1)

nyuen
nyuen

Reputation: 8907

You can set up the UserID in GTM via "Fields to set" for the tags that you want to associate a UserID with.

enter image description here

Just a note about using UserID though. Make sure you read and comply to Google's policy about using this feature:

  • You must make sure you have the full rights to use this service, to upload data, and to use it with your Google Analytics account.
  • You will give your end users proper notice about the implementations and features of Google Analytics you use (e.g. notice about what data you will collect via Google Analytics, and whether this data can be connected to other data you have about the end user). You will either get consent from your end users, or provide them with the opportunity to opt-out from the implementations and features you use.
  • You will not upload any data that allows Google to personally identify an individual (such as certain names, social security numbers, email addresses, or any similar data), or data that permanently identifies a particular device (such as a mobile phone’s unique device identifier if such an identifier cannot be reset), even in hashed form.
  • If you upload any data that allows Google to personally identify an individual, your Google Analytics account can be terminated, and you may lose your Google Analytics data.
  • You will only session stitch authenticated and unauthenticated sessions of your end users if your end users have given consent to such stitch, or if such merger is allowed under applicable laws and regulations.

Upvotes: 1

Related Questions