Blog» Tracking individual users in Google Analytics

Tracking individual users in Google Analytics

By Thiago Campos Viana  | January 27, 2015  |  Business solutions, Web solutions

Google Analytics is the most popular tool for understanding how people are finding and using your site. In addition to its standard reports, you can use its User ID feature to get more fine-grained reporting about registered users. This enables you to better measure, anticipate, and meet or exceed your users' needs.

Google Analytics reports help you discover where your users are coming from, the most viewed pages, access patterns, device usage, display resolution, visitor locations, conversions, and much more. The User ID tracking feature enhances all of those reports but for individual users.

Is your website accessible to people with disabilities?

Get our beginner's guide to website accessibility

Download your FREE copy

There a lot of possible applications for user-specific reporting; for example:

  • An e-commerce site could track what products have been viewed by a certain user and use that information to offer targeted deals that will ultimately lead to more sales.
  • A news portal could analyze the topics a user is interested in and showcase more relevant content and features in order to gain and retain more subscribers.
  • An intranet site could improve company processes by analyzing specific user journeys.
  • A training portal could offer tailored help to individual users.
  • A research website could identify new packages of content that can be sold at a high volume and/or to high value clients.

How to set up Google Analytics User ID reporting

Once you have a Google Analytics account up and running, log in to the web interface and click on the "Admin" link:

Google Analytics account admin link

Google Analytics account admin link

 

Enable the Google Analytics User ID tracking feature by expanding the "Tracking info" property and then clicking on "User-ID".

Google Analytics tracking info and user id links

Google Analytics tracking info and user id links

 

On the next page you can enable the feature and create a User-ID view. This view will show only data from registered users.

Activating Google Analytics User-ID

Activating Google Analytics User-ID

Then, you can create a Google Analytics Custom Dimension that will track the user ID.

Adding custom dimensions to Google Analytics

Adding custom dimensions to Google Analytics

You can name your custom dimension "userId" or another relevant identifier. If you have configured everything correctly, you should be able to filter and drill down based on this new dimension in your Google Analytics reports.

Visualing User-IDs in Google Analytics

Visualing User-IDs in Google Analytics

 

You can also use the advanced filter feature and filter by a specific user ID:

Filtering Google Analytics results by a specific User-ID

Filtering Google Analytics results by a specific User-ID

Of course, you need to configure your website to send the user ID information to Google Analytics. In the eZ Publish content management system, we can do that using the following piece of code somewhere in the pagelayout:

<script>
{literal}
(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','//www.google-analytics.com/analytics.js','ga');
{/literal}
{if $current_user.is_logged_in}
    ga('create', '{ezini('Google', 'Analytics')}', {ldelim} 'userId': '{$current_user.contentobject_id}' {rdelim});
    ga('set', 'dimension1', '{$current_user.contentobject_id}' );
{else}
    ga('create', '{ezini('Google', 'Analytics')}', 'auto');
{/if}
 
ga('send', 'pageview');
</script>

Related Blog Posts

JavaScript and CSS in eZ Publish 5

A key component of a content management system or web application is the handling of JavaScript and CSS files, specifically around loading, combining,...

Read more »

Content auto-linking for better SEO and increased conversions

Links are one of the core elements of the web. Links within body content are not only good for user experience, but also for SEO, engagement, and conversion....

Read more »

Saved searches and e-mail alerts in eZ Publish

A powerful addition a normal site search is for registered users to be able to save their searches, share the searches with others, and create customized...

Read more »

Comments

blog comments powered by Disqus

Hi, we're Mugo Web - Nice to meet you!

We're a group of web experts who solve complex web problems.

Learn more about us »

Search


Categories


Yes - we can do that.

We can do that

Many years of experience with complex websites allows us to offer total solutions.

Learn more about what we can do »

We love our clients (and they love us too)

Collage of logos : American express, Habitat, Car and Driver, Rasmussen, and American museum of Natural History

We've solved problems across North America and around the world.

Learn more about what we've done »

We tweet too

Follow us on Twitter for the latest Mugo happenings

mugo twitter page @mugo

© 2008 - 2017 Mugo Web. All rights reserved.