Online Tutorials & Training Materials | STechies.com
Register Login

Track Registered User-ID in Google Analytics

|| 0

Track Registered User-ID in Google Analytics
Stechies

This tutorial explains how to track Registered User-ID in Google Analytics in four easy steps. There is also an User-ID code in your website to send User Id Data to do this add the given link in you GA code.

These four steps involve:

  1. Click on Admin Tab on you Google Analytics Window
  2. Under Admin Panel of your Account go to.
  3. Create a User-ID view
  4. Check your Registered Users in Google Analytics

1. Click on Admin Tab on you Google Analytics Window

2. Under Admin Panel of your Account go to

Tracking Info >> User ID

And click on I agree to the User-ID Policy.

Then Click on Next Step

Copy the code given in next screen
ga('set', 'userId', {{USER_ID}}); // Set the user ID using signed-in user_id.

And click on Next Step to create User ID View

3. Create a User-ID view

It will take you to New Reporting View Screen give a proper Name to your View Like Track User ID Change the Reporting Time Zone Setting and click on Create View Button

Now you are done with enabling view in you Google Analytics

Add Google Analytics code in your website

Now you need to add User-ID code in your website to send User Id Data to do this add the given link in you GA code

ga('set', 'userId', {{USER_ID}}); // Set the user ID using signed-in user_id.

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXXXX-X', 'auto');
ga('send', 'pageview');

</script>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXXXX-X', 'auto');
ga('set', 'userId', ‘USER_ID’;
ga('send', 'pageview');

</script>

Where User_ID is the value of your registered user_id that you need to track

4.Check your Registered Users in Google Analytics

To view your Registered User id activity click on your analytics window you will find that a new view is get create with the name of Users just click on it and you will have full activity of your Registered Users