How to Set Up User Tracking in WordPress (The Easy Way)

How to Set Up User Tracking in WordPress (The Easy Way)

Looking for a quick and easy way of tracking your user’s activities on your website? If you have a membership website, an online forum, or offer online courses, then tracking your users is useful.

You get insights about how your logged-in users behave on your site, which pages they view, and what are their interests. And using the data, you can create a personalized experience for them.

In this article, we’ll explain how to set up user tracking WordPress. By the end of the guide, you’ll be able to accurately track your subscriber’s activities.

Why Track User Activity in WordPress?

User tracking comes in handy if you have MemberPress website, where you require people to log in and view exclusive content. Or if you have a LifterLMS site where you offer online courses and require user’s to signup and login to view the educational material.

ExactMetrics is the best WordPress Analytics plugin. Get it for free!

Here are a few benefits of setting up user ID tracking in Google Analytics:

  • Get Accurate Data of Unique Visitors – By tracking WordPress user ID, Google Analytics won’t count your visitors twice when they view your site from different devices. This way you get accurate reports of your web traffic.
  • Find Out Which Device Your User’s Use – You can uncover which device logged in users use to view content on your WordPress site (mobile, desktop, or tablet).
  • Offer Personalized Experience – Not all visitors are the same, so you can create a personalized experience for each user. For instance, if you know a user with ID 43 added products to their cart but abandoned, you can then send them a highly targeted email and try to convert them.

Now, let’s see how you can set up user ID tracking in WordPress and Analytics…

How to Set Up User Tracking in Google Analytics

To get started, you can use ExactMetrics. It’s the best premium WordPress Analytics plugin and makes it super easy to use Google Analytics.

But why do you need ExactMetrics?

Well, ExactMetrics replaces Client ID with the User ID for more accurate tracking. Client ID usually represents a browser or a device and is assigned to all unique visitors on your website.

On the other hand, user ID is only assigned to logged-in users. It helps to identify each user across different devices. For instance, if someone logs in and view your site on mobile and then again views it using a desktop, Google Analytics will count them as a single session, thanks to user ID.

Now that you know the difference between user ID and client ID, let’s start the tutorial.

Step 1: Install ExactMetrics and eCommerce Addon

The first thing you’ll need to do is install ExactMetrics WordPress plugin on your website. Make sure you sign up for a Pro plan.

Next, you’ll have to add Google Analytics with your WordPress website.

Now that ExactMetrics is up and running, you can install its eCommerce addon. And do that, go to your WordPress dashboard, and click on ExactMetrics » Addon. Then go to eCommerce and click Install. The addon will automatically activate in a few seconds.

install ecommerce addon exactmetrics

Step 2: Enable User ID Tracking in ExactMetrics

Next, you’ll have to enable user ID tracking in ExactMetrics. And you can do that by going to ExactMetrics » Settings » eCommerce.

Then scroll down and go to User ID Tracking and click on the switch to enable it.

Step 3: Enable User ID Feature in Google Analytics

Once you’ve enabled user ID tracking in ExactMetrics, you’ll also have to enable it in Google Analytics.

So, log in to your Analytics account and select the website where you want to set up user ID. Next, click on Admin settings from the options on your left.

Now, under the Property column, click in Tracking Info and then select User-ID.

wordpress user ID tracking

On the next screen, you’ll see User-ID Policy. Click the toggle under I agree to the User-ID Policy to switch it ON and then click Next step.


Next, you can leave the option of Session Unification to On and click Next step.


Click the Create button to set up User-ID view in your Google Analytics.


You’ll now be taken to a screen where you’ll have to enter the details of your user ID reporting view. To start, enter the name for your reporting view. You can name is User ID View so it’s easier to remember and find out which property has user-ID enabled.

Next, select the reporting time zone for user ID tracking and make sure that you switch ON the option for Show User-ID Report. Then click Create View.



You’ve successfully created a user ID view in Analytics, and you can now track your WordPress user’s activities.

To confirm the settings, you should be able to see your user ID view under View.


Next, click View Settings and make sure that User-ID reports are enabled.

If everything matches, then it means your user-ID tracking is correctly set up. You’ll now have to wait at least 24 hours for Google Analytics to collect data and show you reports.

How to View WordPress User ID Reports in Analytics

With user ID all set up, you can now view your logged-in WordPress user’s activities.

But first, let’s see how you can find out an ID of your logged-in user. To start, go to your WordPress dashboard and then click in Users » All Users. Here you can see all your subscribers.

If you hover over any user, you can see the ID number in the URL where it says user_id=.


Or you can click Edit under the username and view the User ID in your browser URL.

Next, go to your Analytics account to view the report. Navigate to Audience » User Explorer and see stats for your logged-in users.


Using the data from the report, you can create a personalized experience for your users. Or use secondary dimensions to find out where they’re coming from or which device they used.

And that’s it!

We hope you liked our article on how to set up user tracking in WordPress. If you found this post useful, do go through our guide on Google Analytics Custom Dimensions.

Don’t forget to follow us on Twitter and Facebook to stay updated with the latest guides on Google Analytics.

Want to Try ExactMetrics for Free?

Enter the URL of Your WordPress website to install ExactMetrics Lite.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.