Google Analytics User ID Strategies for Sites with Limited or No Login



The User ID features of Google Analytics help address several challenges:

  • Measuring users who switch devices, browsers, or apps as they interact over time.
  • Capturing identifiers for users to match with data about the same users in other systems.

These can be really valuable, and if you’re new to the idea of user ID in Google Analytics, you should read this introduction to how it works and what it does.

If you have a site or app where your users regularly log in (such as a software-as-a-service application, subscription content site, etc.), it’s easy to capture an identifier for users across devices at login. But what about other kinds of sites, where users might only sometimes log in (ecommerce sites, where a login might only be used for purchases, not for browsing/shopping), or sites where users might never log in (like many lead generation or media sites)?

It’s a little less straightforward, but there’s still a lot of value to be gained from using user ID on such sites. Here are several recommendations for capturing

Recommendation 1: Think Creatively about Identifiers

While login is a good identifier for users when our site supports it and they use it, it’s not helpful to us in pulling their behavior together when they don’t log in on a device or experience. Here’s a collection of ideas to incentivize login, which may help for some sites.

But even for sites with no login, users sometimes provide identifying information, such as email addresses when signing up for a newsletter or notification, or requesting contact. Think creatively about when a user is identified and how that can be leveraged for a unique ID:

  • When users enter an email address to a subscription or contact form, can you generate an ID that can be captured and used? (Note: you can’t capture raw email addresses directly; see Recommendation 4: Don’t Be Evil below for more details on what’s OK.)
  • When you send targeted marketing, like email, can you capture an ID for clicks through to your website? This could be for a general newsletter, or for more targeted drip email marketing or other notifications.
  • If you send specific user-targeted coupons or catalog codes (even through snail mail!), can you use those, or an ID generated from them, in a campaign tag or ecommerce coupon code field?

For a detailed example of a strategy along these lines, check out this series on email tracking in Google Analytics.

These strategies can greatly increase your ability to identify users on your site. For example, with a large bricks-and-clicks retailer, we recently used marketing emails to identify users. After implementing the capture of user ID from email clicks, the number of users identified increased by more than fourfold.

Recommendation 2: Use a Custom Dimension

User ID is great for tying together sessions in GA, but it’s not the most accessible dimension for reporting. For this reason, we recommend you also capture whatever values you are using for User ID as a custom dimension. Custom dimensions are more flexible for incorporating into reports and into data exports from GA (see Recommendation 3 below).

Here’s more on custom dimensions.

Recommendation 3: Leverage IDs Outside Google Analytics

The real value of have user identifiers is being able to join them up with data outside Google Analytics. Think about it: if you know that User 1234 did all this stuff on the website, wouldn’t it be great to join that up with User 1234’s records in your CRM, or your email marketing automation software, or your ecommerce system? In this way, we can start to get a holistic view of the customer, with both online and offline interactions pulled together.

How you might join up this data depends on the tool(s) you’re using. In many simple cases, using tools that export data from GA or use its APIs could fulfill your needs. These would include bring together GA data and external data in Excel, Google Sheets, or Tableau.

You can go even further in automating the connections between GA and other tools. Here’s an overview of ways you can use SalesForce data in conjunction with GA, for example.

Using Google Analytics Premium, there’s an additional option: your session-level data exported to BigQuery. Since this is session-level data that includes an ID based on the GA cookie, there’s an additional advantage of being able to go back and pull together previous sessions by the same user in your data. (User ID in GA reports, like pretty much everything else you add to GA over time, only affects data going forward.) This is especially important for lead generation sites, for example, where the identification (e.g., filling out a contact form) may be one of the last interactions the user has with your website (as the sales process is fulfilled offline).

You can access BigQuery data in many of the same ways (Excel, Google Sheets, Tableau). It’s also an ideal data set for building a data warehouse or data lake that brings together GA data with other data sets, for applications like data mining.

Recommendation 4: Don’t Be Evil

There are specific things you cannot do under GA’s terms of service and user ID policy. Notably, you can’t directly collect personally identifiable information in GA. This means no names, email addresses, etc. as the user ID or a custom dimension in GA. You’ll have to use anonymized identifiers that you can later join up with your other tools. (User 1234) in GA gets matched up with (John Smith in your CRM.

Besides what you are allowed to do, think about what you should do, and how best to communicate that to your users. Here’s what I had to say about these issues in the User ID chapter of our book:

CAUTION: When it comes to identifying users, what’s technically possible extends beyond what’s permitted under GA’s policies. There are a number of techniques for more precise identification of individuals across browsers or when cookies are deleted that would not be permissible (such as recreating cookies from the Flash shared object or browser fingerprinting, or using a mobile device identifier). Google’s policies and the laws of the countries in which you operate are subject to change; check them carefully and seek legal advice if necessary to ensure you’re playing by the rules. Remember that reputable websites always clearly inform users how their data will be collected, retained, and used.


Got any creative ways you’ve used GA’s user ID features to better understand and serve your users? Let us know in the comments.

Jonathan Weber is our Data Evangelist, focusing on bringing the strategic value of data analysis to our customers. He spreads the principles of analytics through our training seminars and even wrote a book on Google Analytics & Tag Manager. Before he caught the analytics bug, he worked in information architecture. Away from the computer, you can find him as a flower farmer and plant geek.

  • Great article, thank you!

  • Bangalorekar Ranganath

    Elaborate and informative. Good to preserve for future reference.
    Jonathan Weber deserves a wide round of applause for this.

  • Matthew

    Hey Jonathan, great post with good recommendations. You talk about the User ID only being available in reports going forward, but GA has the nifty option of Session Stitching based on the User ID – does that mean you woulf also have the User ID dimension for previous sessions if they were stitched correctly, prior to the collection and activation of the User ID itself?

    • Thanks, Matthew! The session unification in GA only affects hits within the sessions where a user ID was set, not any past sessions. There’s a couple of good illustrations here that describe exactly how it works:

      • John

        Couldn’t you just store the user id in a separate cookie when a user first signs in and use that to keep them connected to the userid even when they have logged out? Is that against the user id policy?

  • Priyank

    Thanks for such a information, i have one doubt, what should we do or
    what the steps we have to follow for convert user id to some
    alphanumeric user id which can be display on GA. to avoid PII. please
    provide some information about difference between client id and user id.

  • Manoharah Manu

    Yes. Google analytics tracks every customer, device they use, through which medium they landed on your website, and lot more. But, there are so many features and options that it is difficult to track every visitor and their demographics, which doesn’t make sense sometimes. There are easier ways to do this. For example, Lucep will help you get more conversions, and also provides all the traffic analytics data you need.

  • Arron Chapman

    What about using the Client ID and creating a User ID from that?

    • Using the Client ID as GA’s User ID doesn’t really get you any advantages. The point of a User ID is to be able to tie multiple Client IDs together.

      The Client ID can be a useful identifier itself, however, for connecting data in GA to data elsewhere — you can pass it through in a contact form to a CRM, for example.

  • sanjay shukla

    With Google Analytics Premium & BigQuery is the User-Id attributes exportable ?

    • Yes, the User ID is exported in the BQ schema for User-ID-enabled views. For regular views, we recommend also capturing User ID in a custom dimension, as mentioned above.

  • Kate

    Morning Jonathan , I’m in the case of No-login website, and I’m trying to define which are my existing customers (=with transaction).
    I also have some events in my website in order to ask to the users, if they are exist vs prospect.
    I’m thinking to collect them with some custom dimension, and the rule is: when the user clicked on these cta or links I’ll push my CD with value 1 = existing customers. What do you think?
    Do you have other ideas? Actually the next steps is dedicate to create a custom dashboard about the flow of these users… where they are lost, etc…

    any help will be appreciate

Contact Us.

Follow Us



We'll get back to you
in ONE business day.
Our Locations
THE FOUNDRY [map] LunaMetrics

24 S. 18th Street
Suite 100

Pittsburgh, PA 15203


4115 N. Ravenswood
Suite 101
Chicago, IL 60613


2100 Manchester Rd.
Building C, Suite 1750
Wheaton, IL 60187