Back to blog

User ID analytics overtakes cookies in accurate customer tracking


Written by ,

Published September 5, 2019 · Updated April 11, 2024

User ID analytics overtakes cookies in accurate customer tracking

Web analytics is all about tracking user behavior to better understand it and make converting easier. New technologies are constantly being produced that make it easier to get a fuller picture of user behavior.

In this post we’ll talk about one of these very technologies: user ID analytics. We’ll also discuss how it’s breaking through to become the new go-to choice over traditional, less accurate analytics based on cookies. After reading, you’ll know how user ID tracking works and why it’s better than cookies.

Cookie-based analytics, which has been around for decades, works by placing a cookie in a user’s browser to track a session. While this method worked well for a long time, in an age where people access the web using multiple devices, this type of tracking can’t handle the task. At the end of the day, cookies seem better suited to tracking unique devices rather than people.

Multi-device browsing becomes an issue of clientID vs. user ID. When a user accesses a website, a cookie is created and they’re assigned a clientID. This is then used in analytics for this and future sessions.

The problem occurs when this user, instead of browsing a website on their desktop at home, grabs their mobile to check out the same site. Since the mobile device doesn’t share the cookie with the desktop, the website naturally creates a new one for this device. A new or unique client ID is assigned to this cookie, and that’s where the problems begin.

One user on four devices shows up as one unique visitor with user ID. Image source:

When someone comes to the same website using different devices or browsers, your analytics will report these visits as unique clientIDs, when in fact they are the same user. Every time someone returns to the same webpage a new clientID will be generated, for example, if they:

  • visit the website or app on a laptop instead of desktop
  • switch from Chrome to Safari (this can be on a laptop, desktop or mobile)
  • change laptops or desktops (for example, home to work computer, or mobile)
  • start browsing the website or app using smartphone
  • decide to enter this website through a smart TV

The number of web-connected devices per household rises every year. Let’s look at an example focused on web browsing devices. Your average user has a personal and company laptop, at least one smartphone, and a tablet for good measure.

Four devices to access your website, each with the ability to support multiple browsers (Safari, Firefox, Chrome, etc.). You can see how easily one individual can show up as at least four, but possibly even more users. This is known as a cross-device attribution problem.

Cases of quadruplet user cloning may be rare, but you can assume any user has come to your page from both a mobile and desktop. This alone creates a duplication of almost ever user ID session you’re seeing in analytics. You simply can’t rely on this information to make sound data-driven decisions from your analytics.

In addition to a multi-device culture becoming the status quo, cookies have earned a bad reputation after being lumped in with the “everything to do with programmatic advertising is bad” mindset.

The negative connotation associated with cookies has led to a huge increase in blocking software, browsers, and people who simply do not consent to cookies. As more and more of them are blocked, the ability of cookies to function as a tracking tool becomes less and less reliable. Learn more about using first-party data from this post.

The shortcomings of using cookies appear in other areas as well:

  • Creating 360° single customer views is difficult considering the complexity of modern customer journeys involving multiple cross-journey and cross-device touchpoints. Cookie tracking misleads you by generating multiple sessions and artificial users.
  • Integrating offline data, like CRM, with your analytics will be difficult if you can’t sync offline people with online profiles.
  • Tracking users between pre and post-login areas, due to privacy and security issues, is commonly done using two separate analytics solutions which produce disjointed journeys.
  • Tracking users that move from the main site to a payment processor can turn one session into multiple sessions, creating inaccurate data along the way. This is especially painful for e-commerce and SaaS companies processing several exchanges through external gateways.
  • Users moving between domains and subdomains of larger companies can create cross-domain tracking issues in your analytics.

Critically, these weaknesses present themselves at some of the most valuable conversation points like customers deciding to make a purchase or create/login to a user profile. So how can you track user behavior online while maintaining accuracy? This is where user ID analytics can help.


The comparison of 10 web and app analytics platforms

Compare the main features of Piwik PRO Enterprise, Google Analytics 4, Matomo Cloud, Adobe Analytics, AT Internet, Countly Enterprise, Mixpanel Enterprise, Amplitude Enterprise, Snowplow Enterprise, and Heap Premier.

User ID analytics

User IDs are unique alphanumeric identifiers assigned to people based on their login information rather than device or browser. Identifications are generated randomly and don’t contain any identifiable data. Once an ID is created, it is linked to the login account that created it. Once a user logs in, regardless of the device or browser all activities will be attributed to their unique user ID.

One user on four devices shows up as one unique visitor with user ID.
Image source:

User ID enables you to:

  • accurately collect and combine data from sessions across multiple devices and browsers without multi device and browser attribution issues
  • understand how individual people use your website from page navigation to downloads without duplication issues that client ID presents
  • break down and understand complicated multi-device buying journeys that stretch over time and devices
  • obtain 360-degree customer views by combining online and offline data sources like CRM and other offline data imports

Simply put, user ID helps you better understand real people’s actions on your website. Instead of creating false unique sessions, ID tracking allows you to see your customers’ journey and makes your data more actionable.

Who benefits most from user ID analytics?

Every website stands to gain something with user ID tracking, but some more than others. So who will get the most out of it?

Organizations that want 360-degree customer views.
It’s impossible to achieve anything close to a 360-degree customer view without integrating all the data you have at hand about your customers. To do so, you need a system in place that allows you to connect data sources and create customer views that make sense.

Organizations that want to break down data silos or integrate offline data.
User ID and single customer view provide a point of integration for multiple data sources. Instead of isolating data, which is often the case with offline data and walled online data, you now have a place where you can combine all your data to create actionable profiles.

Any website that requires login or has secure post-login areas.
If your website requires logins, you’ve already tackled one of the biggest challenges of implementing user ID tracking. Not every site can find good ways to incentivise their visitors to create profiles and consistently log in – consider yourself lucky if this is your website’s default mode of operation.

Websites with post-login secure areas (think mobile banking) benefit because cookie tracking is normally considered a security risk in these sections.

Websites that use Facebook, or other social media logins.
Social media logins can often scramble referral data, creating some pretty messy data as a result. User ID keeps everything organized so you’re not generating nonsense data.

Sites that use external payment processors.
When customers leave your site to close their sale, fragments are created in that journey and you can lose valuable information about how the sale was made. Session stitching allows users to leave your site for payments and come back without losing sight of them in your analytics.

Large organizations with multiple domain web footprints.
If you’re working across multiple domains, it’s crucial to be able to track users as they jump from one domain to the other, especially if your websites are designed for such cross-domain interactions. User ID and session stitching give you the ability to track customers across domains and provide you with clear customer profiles that capture all these actions.

Sites with AMP, or iframe pages.
Sites that contain iframe elements, or redirect to accelerated mobile pages generally complicate analytics data once users start going cross-domain. Session stitching with user IDs keeps track of everything going on in these complicated multi-domain customer paths.

Limitations of user ID

The biggest limitation of user ID is that people need to log in to your website for it to work. Without registration a user ID is never created, and without login that person is never linked to their ID. It’s very important to incentivise account creation and user logins to achieve the results you’re looking for.

Many websites do this by offering exclusive registered user benefits such as promotions or high-quality gated content. Think of Pinterest, you can find their images on Google all the time but you have to log in to access the full page and similar content. It will be up to you to think outside the box and figure out a way to encourage users to login.

Another problem is pre-login data that isn’t attributed to the user. User ID tracking starts working after someone has logged in, but everything they do before that login is not accurately recorded in their session. The good news is that there’s a technical work-around using session stitching to connect these fragmented sessions. Let’s talk more about this in the next section.

Overcoming user ID limitations with sessions stitching

Session stitching works by linking together user single-session activity that would normally be reported as two sessions. Examples of such activity would be cross-domain or pre-login actions. Stitching will combine the two fragments of sessions, pre and post-login, into one. This is crucial for creating clear customer journeys and getting into your user’s shoes.

When someone visits your page without logging in, they obtain a client ID. After they log in, they receive a user ID. Stitching will combine the data from both to create the full picture, but this only works for sessions immediately preceding a login. If someone visited your website three days ago, didn’t login, and ended the session, that data won’t be stitched the next time they come.

No session stitching – shaded portions represent logged-in users. Red dashed boxes represent data attributed to user ID. Image source:
Using session stitching, the analytics data from session #2 is attributed to the user ID of the person logged in. Image source:

Example of using Piwik PRO user ID

For instance, user ID is used in Piwik PRO’s Customer Data Platform to create single customer views. The view is enriched with data from sources like CRM, analytics, and email campaigns to create a holistic profile of the individual while simultaneously breaking down data silos.

Session stitching is used to connect the dots between anonymous user activity and known customers. You’re able to see those crucial steps that were taken before someone signed up and made a purchase.

Single customer view from Piwik PRO Audience Manager

You can also see what type of device and browser the person was using while visiting your website. This solves the issue of cross-device attribution and customer journeys.

How to implement user ID analytics

The most important step in implementation is generating user IDs. Since analytics platforms utilize cookie tracking out of the box, they don’t create user IDs or apply them without some setting up first.

Login confirmations like this are one way for your website to capture logins

An easy way to do this is by displaying a login confirmation message including the user name. Next, you can configure tag manager to grab this email from the code and link it with the corresponding user ID. For a more detailed explanation check out our help center article.

It’s important to mention here that personally identifiable information shouldn’t be passed to your analytics platform. For example, email addresses need to be anonymized up front.

Once you have this set up, your website will automatically assign user IDs to new and returning visitors who log in. After enabling user ID features in your analytics, the IDs will begin to be exported from your website. You can start using them to view individual cross-device journeys.

User ID cases involving offline data

We’ve touched on connecting offline data with online data to create a full journey map. Customers shouldn’t “go dark” as soon as they begin interacting offline. Let’s look at an example involving journeys that are both online and offline, and data involving uploading.

Online leads that close offline

Your company receives an inbound lead online. All the steps are taken to reach out to this prospect and nudge them down your sales funnel. The lead considers the product’s features, price point, potential ROI, etc. for a couple months and then decides to buy.

Logically, they decide to simply call the representative they’ve been chatting with by email and close the deal over the phone. It’s great to close deals, but it’s important to analyze what happened so you can understand and recreate this sales journey.

Let’s look at this particular one and how you can benefit from applying user IDs. The prospect browses your page, takes interest, and finally downloads some gated material about your company. After entering their email address to access the material, a user ID can be generated for them. Now you have a single customer view profile, and thanks to session stitching all actions prior to providing an email address will be included.

Things get tricky when the journey goes offline and the sales rep is contacted directly by phone. Even though the deal is closed offline, the sales team is still using CRM to update information about the client and the sale.

Applying the user ID you created for analytics in CRM reports will allow exported CRM data to be recognized by your analytics and track conversions with event/ecommerce event hits.


Anyone who wants to know more about their customers’ journeys should start using user ID analytics. Cookie-based tracking is becoming less and less reliable, and with analytics leaning towards first-party data dependency it’s better to get ahead of the technology curve. Piwik PRO provides robust user ID solutions that support single customer view and customer journey analytics. Don’t hesitate to reach out to us and find out more.


Peter Curac-Dahl

See more posts by this author


Marek Juszczyński

See more posts by this author