How to Set Up User Tracking in Google Analytics

Want your stats to identify logged-in users by their WordPress user IDs? It’s easy with MonsterInsights. In this guide, we’ll show you how to enable user tracking in MonsterInsights and in Google Analytics, so you can start tracking individual logged-in users.

Before starting, you’ll need to have MonsterInsights Pro installed and your Google Analytics account connected.

Before reading further, make sure to verify whether you have a Universal Analytics (UA) property or a Google Analytics 4 (GA4) property so that you can follow the correct instructions, as steps might differ between both property types.

Not sure which Google Analytics property type you have? Read about the differences here: Google Analytics 4 Versus Universal Analytics

Google Analytics 4

If you have a GA4 property, this option is automatically turned on by default at Admin » Reporting Identity. You should see the option By User-ID and device selected.

Having this setting enabled means that Google Analytics will use both devices and User-ID to identify site visitors. First, it will attempt to use User-ID if it’s available. If there isn’t any User-ID to use, App Instance ID will be used as a fallback.

Universal Analytics

Step 1: Enable User Tracking in MonsterInsights

The first step is quite easy. The eCommerce Addon will need to be active. Then, you’ll need to navigate to Insights » Settings» eCommerce in your WordPress dashboard.

From here, you can check the Enable User ID tracking toggle. The panel will auto-save your new setting as soon as the toggle is adjusted.

Step 2: Enable User Tracking in Google Analytics

After enabling user tracking on the Demographics tab of the Tracking section of the MonsterInsights settings, you will need to enable this feature and create a new UserID view in Google Analytics in order to make use of this feature.

You’ll need to log in to your Google Analytics account and select the website you’d like to enable user tracking for.

Find + Select your site in GA

Then, click Admin.


Now click the Tracking Info link in the centre column to expand the submenu, and click the User-ID link that appears below.

User ID Settings

On the next page, you’ll have to click the Off switch to On and click the Next Step button to agree to the User-ID policy.

Agree to User ID policy

In step 2, you don’t need to do anything but click Next Step again.

Session Unification

In step 3, just click the Create button to create the UserID view.

Create User ID View

Next, you will be taken to this screen where you will have to enter a Reporting View Name (we recommend including UserID in the name so it’s easy to remember which view has UserID tracking enabled).

Name Reporting Wiew

Then, turn on the Show User-ID Reports option for this view. Enable User ID View

Finally, you can scroll down and click the Create View button.

Confirm new view created

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.

Click logo

You can now access your new User-ID view.

Switch to User ID View

Then, just click on Audience » User Explorer in the left menu to see your user data. You’ll see that each user is now listed by their user ID in WordPress.

Navigate to User Explorer

You can click on the User ID to see more detailed info on each user.

View User IDs in GA

Wondering how to tell which WordPress user belongs to which ID? To find out, just go to your WordPress dashboard and click on Users » All Users.

Then, hover your cursor over the user you want to find the ID for. You’ll see a URL appear at the bottom of your browser. In the middle of the URL, it will say “user_id=”. The number after that is the user’s ID number.

Get WordPress User ID

You can click the Edit link under the username to make sure. You’ll see the user ID in the web address on the edit page.

How to get WordPress User ID

That’s it! Now you can track each WordPress user who has an account on your site.

Want to track even more data? Check out our guide on how to get started with the MonsterInsights eCommerce addon.