AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.3K members online now
2.3K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

User ID as a custom dimension - curious case

Explorer ✭ ✭ ☆
# 1
Explorer ✭ ✭ ☆

Hi,

I try to implement User ID and found one thing that I could not wrap my mind around. I set up userID (with Session Unification turned on) which in the process created userID view.

I set field "&uid" to every UA tag in GTM except for non-interactive events. To the same tags I also assigned session-scope custom dimension which takes values from the same variable as "&uid" does (userID variable is "undefined" once user logs out).

And the question is: do you think that I will get the same data in userID view as in regular view but with session-scoped custom dimension enabled?

I assumed that setting session-level custom dimension works in this case similarly as Session Unification for userID view. What do you think?

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Olgierd N
May 2016

Re: User ID as a custom dimension - curious case

Top Contributor
# 2
Top Contributor
Hi,

in GTM you can now freely use Fields to Set: userId. Apply the user Id value to each hit sent to GA (when the value is available).

Session level custom dimension are stitched to the entire session regardless if the CD was defined on first, mid or last hit inside the session. Session unification on the other hand only looks at the last hit with the userId value defined and unifies that hit with all previous hits inside the session. Subsequent hits inside the session without the userId present will not be unified.

Kind regards,
Zorin
Web analyst @ escapestudio.net

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Olgierd N
May 2016

Re: User ID as a custom dimension - curious case

Top Contributor
# 2
Top Contributor
Hi,

in GTM you can now freely use Fields to Set: userId. Apply the user Id value to each hit sent to GA (when the value is available).

Session level custom dimension are stitched to the entire session regardless if the CD was defined on first, mid or last hit inside the session. Session unification on the other hand only looks at the last hit with the userId value defined and unifies that hit with all previous hits inside the session. Subsequent hits inside the session without the userId present will not be unified.

Kind regards,
Zorin
Web analyst @ escapestudio.net

Re: User ID as a custom dimension - curious case

[ Edited ]
Explorer ✭ ✭ ☆
# 3
Explorer ✭ ✭ ☆

Hi Zorin,

Thank you for your thorough answer - now I understand the difference. However in my case userID and "logged-in" custom dimension are attached to all hits and take value from the same variable. The variable itself is constructed in a way that when user logs out it returns "undefined" value. From my understanding it means that from that moment on userID view as well as "logged-in" custom dimension will not be getting any data.


My case scenarios:

1. Custom dimension - User comes to website as anonymous and session starts. At some point he logs in, CD gets sent and all previous hits from that session are being assigned CD value. User logs out, CD value is "undefined" so no subsequent hits will be sent to GA.

2. userID - User comes to website as anonymous and session starts. At some point he logs in and userId starts collecting data, all previous hits from that session are being assigned to that userID (Session Unification). User logs out, data to userID view stops flowing.

 

As I understand it - in both cases it should collect basically the same data. How do you think?

Re: User ID as a custom dimension - curious case

Top Contributor
# 4
Top Contributor
Hi,

it will probably never collect the same data as the Custom Dimension does not depend on the sam restrictions as the user id feature.

For instance in case of CD if you send the value on the first hit the entire session will be 'saturated' with the value. On the other hand the user id view will only contain a session with the first initial hit.

Kind regards,
Zorin
Web analyst @ escapestudio.net