Home › Blog › Business Analytics

User ID is the feature of new Google Analytics version, and it’s available for accounts with Universal Analytics interface.
To activate this function:
* you’ll need to open the control panel and choose an appropriate option;
* create new view;
* set up data transfer between site and Universal Analytics

Let’s get over a bit further how to set up User ID. To activate it choose PROPERTY from the list and click Tracking Code button.

Set up User ID function

Pay very close attention to the User ID policy before you can enable the feature. And if you agree click ON and NEXT STEP.

User ID policy

The second point is a sample tracking code. This snippet transfers User ID info, so you can create your own IDs and associate them with a set of data. Also, there is the ability to unify the user sessions. Best Practices are certainly worth exploring to be well-versed at the Universal Analytics settings. After that click NEXT STEP.

The third step is the creation of an appropriate view in the GA control panel. Click CREATE button and fill the relevant details.

Create User ID view

User ID set up is completed at the Control Panel. We make to pass the first three important steps. So there’s only one thing - data transfer to Google Analytics.
I suggest to consider two basic ways:
* By means Google Analytics tracking code;
* By means Google Tag Manager

User ID by means Google Analytics tracking code

On the second step of activation this function, we have tracking code to send User-ID data to Google Analytics.

Send User -ID data to GA

Remember that method SET must be created before SEND Hit to the Universal Analytics. Add this snippet to the Universal Analytics tracking code. In the end get something like that:

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  ga('create', 'UA-50401698-1', 'auto');
    ga('send', '&uid', 12345)
  ga('send', 'pageview');

And you can check data sending in your console or webmaster tools.

User ID by means Google Tag Manager

To send User ID data by means Google Tag Manager you need to create a new data layer variable.

User-ID Tracking Tag

After that create new tag and Click on Fields to Set link under More Settings as shown below

Tag User-ID

Click on the +Add Field button and then select user id from the Field Name drop down menu.

User-ID tracking variation

Save your Google Analytics tag, preview the container and then publish it.
And one more important thing is that User ID does not allow to track the actions and visits of a particular user. User ID goal is to combine the user website visits through different devices.