Google Analytics User ID integration


Situation: Message from Google Analytics right after enabling the User-ID feature: “(…) set up and configure the User-ID in your tracking code…”.

My question is: I have integrated my Unbounce pages with Google Analytics using Script Manager “UA” integration. In order to access and modify the Analytics code, should I now delete the integration I’ve done and add the Analytics code as “other” in order to be able to modify it by adding a new line? 

In other words, how it is suppoused I can add the following line to my Google Analytics tracking: “ga(‘set’, ‘userId’, {{USER_ID}})…”

Thanks in advance!


Where are you generating user-IDs from? Unbounce doesn’t allow visitors to login in, so it’s not intuitive to manually set user-IDs inside Unbounce for GA.


Hi Phillip,

I’ts not necessarily related to user’s loging actions, but Device Paths reports in GA. The Device Paths report shows you the sequence of device categories used to engage your content. This report lets you know the ways user move between devices as they engage with your content and progress towards conversion. 



Hi Santiago,

Just to confirm what Phillip was saying and try to bridge the gap a bit. While you’re right to a certain degree, Device Paths report are reliant on setting a user ID in the tracker, that user ID is then used to track all the logins from that user across multiple devices, without the user logging in (or some method of validating which user it is and assigning the correct  user ID from your database or system) then it’s not possible to do this. 

What User ID were you going to use that will be assigned to that specific user every time they access your landing page from any device? As far as I’m aware there isn’t one, at least not a unique I.D that stays the same for that person each visit. Will this be pulled from your CRM or Database system? How do you identify which user it is and what their User ID is?

Phillip is right, it’s normally used when you have users who log in that way you know their identity and you can assign the correct user ID to them. I’m struggling to see how you’re going to apply this to a landing page without having a login function or some way of the user proving who they are. Great for existing users, not so great for new ones.

The best I can think you could do would be to create and assign a unique ID to every person who visits the landing page, include that as a hidden field in your form and make sure that data is passed to your CRM/DB, send the user an automated email with their I.D or some kind of login details that they can use for I.D purposes. It’s not very user-friendly and it’ll likely be full of holes. 

The following is Googles’ explanation of the use of user ID. 

After you enable the User ID by agreeing to the policy, you must implement the User ID in your tracking code. To use the User ID, you must be able to generate your own unique IDs, assign IDs to new users and consistently reassign IDs to returning users, and include these IDs in the data you send to Analytics. This step should be completed by a developer, see the Related resources section below for more information.I hope that clarifies the functionality a bit, if you have a plan for covering the User ID, I would be happy to help you get it up and running as a challenge :wink: