Enable User ID Tracking
To enable User ID functionality, you need to start sending User IDs to your marketing engine dashboard.
To start, you will need to identify what data your site holds for each user that can be used as a User ID. Every website system that allows people to log in should have at least one unique identifier that it uses to differentiate between users. This may be a unique number, a username, or simply a user’s email address.
It is recommended you set a user’s email address as a User ID if you can. This is because it will also allow you to track the same user when they complete a contact or subscription form, even while they are logged out.
The next step is to send this unique identifier through to Satisfi Labs Analytics. The exact method for doing this will vary depending on how your site was built. You can find step-by-step instructions for the various methods below.
How to Configure User ID Tracking for WordPress
WordPress users can typically change their email address, but not their username. When selecting a unique identifier in the guides below, select Username if you want the most reliable long-term identifier. However, if you also want to capture a User ID from form submissions of logged out users too, you should use Email Address instead.
Satisfi Labs for WordPress: How to Enable User ID Tracking
Log in to your WordPress dashboard with an admin account.
Hover over Satisfi Labs Analytics in the menu and click Settings within the sub-menu.
Scroll down to the User ID dropdown and select Email Address or Username.
Click the blue Save Changes button below, and User ID tracking will be enabled.
WP-Satisfi Labs: How to Enable User ID Tracking
Log in to your WordPress dashboard with an admin account.
Hover over Settings in the menu and click on WP-Matomo depending on which version you have installed.
Click on the Enable Tracking
Enable a non-manual tracking method in the Add tracking code
Scroll down to the User ID Tracking setting and select Email Address or Username in the dropdown.
Click the blue Save Changes button, and User IDs will begin tracking immediately.
How to Configure User ID Tracking with Tag Manager
The method for configuring User ID tracking with Tag Manager will vary depending on how your website has been built. As there is no standardized way of including User IDs within your website code, you will likely need to set this up yourself or get developer assistance.
Install and configure Tag Manager for your site.
Create a variable called UserID that captures each visitor’s unique user identifier. If you display usernames on the front end of your site, you may want to create a variable from a HTML DOM selector whilst a user is logged in. Or, for a more flexible method, you can configure your website to expose a user’s unique identifier, such as an email address, to the data layer with a little custom code.
Create or update your Marketing Engine Configuration variable to collect the UserID. Assuming you named your User ID variable in the last step UserID, you would scroll down to the User ID text field and input {{UserID}} to pull the values captured by that variable into your tracking configuration.
Preview and publish your updated container. While previewing, you can visit your website and a Tag Manager debug screen will show at the bottom half of your screen. You can click the Variables tab within this to ensure the UserID variable is being picked up correctly by Tag Manager. Once confirmed, publish your container to begin tracking User IDs.
How to Send User ID with the JavaScript Client
If you have a completely custom website, you can add a JavaScript snippet of code to your website which sends the User ID to the marketing engine via the Javascript Tracking API. To do this, you would add the unique identifier for a user to the following snippet of code:
The example above, _paq.push([ ]); sends the data to the marketing engine. ‘setUserId’ defines what data is being sent, and you should configure the second argument ‘USER_ID_HERE’, to dynamically contain the unique User ID of the visitor currently viewing the page. This code should be placed within your tracking code, above the action that you are tracking.
For example, the code above within the standard pageview tracking code would look like this:
Last updated
Was this helpful?