How to Set Up User Tracking in Google Analytics

Do you have a membership site, an online forum, or an education or training website, or a website that otherwise has protected content that your users need to log-in to view?

That’s great news– because with ExactMetrics’ User Tracking feature you can track each user who has logged into your WordPress website with their User ID.

The behavior of each specific logged-in User on your WordPress website can be tracked via ExactMetrics’ User ID function and will be visible in Google Analytics in the User Explorer, and also a custom dimension if setup.

Please note that the User ID is the WordPress User ID as seen below, not the username, email or real name of the individual. This is because Google Analytics doesn’t allow any personally identifiable information (PII) to be added to Google Analytics as per their ToS.

Prerequisites: To get started, you’ll need:

Step 1: Enable User Tracking in ExactMetrics

You will need to install and activate the ExactMetrics eCommerce Addon. Then, navigate to ExactMetrics » Settings» eCommerce in your WordPress dashboard.

Below the eCommerce tracking section, is the User ID tracking area. You might need to click the arrow on the right to reveal the entire section. Click the Toggle to Enable User ID tracking in ExactMetrics. This will auto-save your new setting. Next, you will need to proceed to Google Analytics to complete the setup in Google Analytics.

Step 2: Enable User Tracking in Google Analytics

We will now need to enable the User ID feature in Google Analytics and create a new User ID view in Google Analytics to make use of this feature.

First, log in to your Google Analytics account. Next, select the website profile you need to enable user tracking for:

 

Click on the Admin settings for this profile:

 

Now, on the settings page, under your site Profile Property column (the middle column) Click Tracking Info » Then User-ID:

 

On the panel which expands, you’ll need to click the toggle to On and then push the Next Step button which will indicates your agreement to the User-ID policy:

Next, leave “session unification” on and click Next Step.

Click the Create button which will create the User-ID view for your website.

Next, you will need to name your new Reporting View Name (we recommend including User-ID in the name so it’s easy to remember which view has User-ID tracking enabled).

Be sure that the Show User-ID Reports toggle is enabled in this view:

Next, Scroll down and click the Create View button.

 

 

You’ll see a brief success message. Then, click the Google Analytics logo at the top of the page.

There will not be any data in the User ID view.

It can now take 24 hours for data to display in the new view. It will not contain data from the past, however, data will start being collected now and moving forward.

 

While you can now access your new User-ID view, please ignore any errors in the reports until 24-hours have pasted and data has been collected.

However, we have sometimes seen a bug in Google Analytics where upon initial creation of the new User-ID view, in some rare instances, the User-ID setting isn’t actually enabled on the 1st try. To make sure this didn’t happen to you, please navigate back to the admin area and confirm User-ID is active:

Step 1. of confirmation, navigate to the view:

Step 2. Click View Settings.

Step 3. Ensure User-ID reports are enabled for this view:

Step 3. Please Wait for at Least 24 Hours for Users to Login and Data to Populate.

 

It’s been 1 day. 🙂

Please note that when a new view is created, it doesn’t contain any data, so it will only contain data moving forward.

Now, you’re sure some users are likely to have logged into your site.

Please navigate to Audience » User Explorer at Google Analytics in the left menu to see your user data.

You’ll see that each user is now listed by their user ID in WordPress.

You can now click on the User ID of individual users who have logged in to see more detailed info on each user:

To know which WordPress User is associated with each ID you will need to go to your WordPress dashboard and click on Users » All Users.

When you hover your cursor over the user you want to find the ID for you can see a URL appear at the bottom of your browser.

In that URL, it says “user_id=”. The number after that is the user’s ID number in Google Analytics, above.

You can also click the Edit link under the username. Now the User ID will appear in the browser web address on the edit page:

Now, you know how to track each logged-in WordPress user who has an account on your WordPress LMS or Membership site!

Next, please see our guide on how to get started with the ExactMetrics eCommerce addon, or our Getting Started with ExactMetrics: Guide and Checklist for Advanced Metrics for even more step-by-step guides for very advanced metrics setups.