Leveraging benefits of Google Analytics' User-Id enabled views for websites without user accounts
User-Id view allows you to analyze website usage across user devices — stitch every user interaction (session) into single coherent story. You know the benefits.
Lets assume that you do not have user accounts on you website, or users are not forced to login to benefit from the website. This is good for your users, but leaves you handing if you want to understand how people use your website, how often they return, which channels make they return, whatever they use different devices and so on.
Lets also assume that you have a newsletter subscription form or contact form (which does not give lawful reason to send marketing communication, but lets leave this discussion aside). Anyhow, this contact form where user enters email address cracks open the window to wonderland of surveillance and total control … I mean insightful business intelligence.
To make it happen several things should be configured and implemented.
1. Configuration Google Analytics
First, enable User-ID in your Google analytics property, and create User-ID reporting view. Make sure to read User-ID policy carefully, this this serious stuff right there, and keep Session unification switch in ON position. Session unifications lets GA link pageview and events which happened during user visit before user Id was set, e.g. before the user submitted contact form.
2. Create and store userId
This part is where you need to call you web developer, and show him or her the rest of the article.
First, remember signup/newsletter/contact forms you have on the website? Now you need to change it so at the moment of submit, a bit of javascript transform user email address to md5 hash. This hash is your userId from now on. Same bit of javascript code needs to do 3 more things:
- Send the hash alongside with the rest of signup form data as additional field.
- Let GA tracking code know that you have userId. Depending on your implementation it can be as easy as adding one line of code (analytics.js) or another line of code plus some configuration (gtag.js)
- Store userid to cookies for the next user visit.
3. Update email links
At this point you have userid stored in contacts list in your marketing automation tool (mailchimp, hubspot, autopilot). Make sure to add additional URL parameter, lets say &uid={insert-userid-here}, to each link leading to your website with userId. This is needed to identify this person next time she or he lands to the website.
4. Meet your user again
Next time when the same person lands to the website either directly using the same device and browser, or using link if email on different device, you will be able to piece together this visit with previous one into more coherent story.
Now you need to let GA know that this visitor is in fact same person you already know and she or he loves you enough to visit the website one more time.
Call webdev back in and ask him to set userId variable for GTM or tracking code.
You got it. Of course limitations apply.
Limitations
Limitations are well described here, but long story short, User-ID enabled view will only show analytics for people who were committed enough to enter their email to that signup form. This is why additional reporting view is created at the first place, you will still be able to analyze entire unstitched traffic in default view.
Furthermore, even thought Google Analytics will be able to stitch most of user visits together, it is likely that some will slip through the cracks, e.g. when user directly navigates to the website using different device or different browser on the same device.
Nevertheless it worth the hustle to better understand and serve your committed users.
Summary
User-Id enabled reporting view connects together user engagement data from multiple devices browsers and sessions, to make it work on the websites without user accounts one needs to:
- Enable User-ID and create a new reporting view in GA.
- Generate userid when users subscribes to mailing list.
- Store userid in your mailing list, browser cookies and set it in GA tracking.
- Change links to the website to include userid in marketing emails.
- At the beginning of user session, check if you have userid in cookies or in URL parameters and set it in GA tracking.
Let me know in the comment section below what you think, was it helpful for you, or what you would suggest to add or extend upon. Thanks for reading.