Passing UserID
-
I am trying to generate analytics report to differentiate between guests and members on my website. I have added the code below to the ‘custom GA code’ section, however this still sets a value of 0 for guests, however Google instructions for sending user ID say that no value should be passed for guests. Is there a way to use the Custom Code option to only send this value if it is not 0?
“Don’t send a user ID when a user isn’t signed in. If a user isn’t signed in, don’t pass the user ID parameter, or leave the value as undefined. Don’t set a custom value, like?
"empty"
?or?"NA"
. Setting the same value for all sessions without a user signed in causes issues with the accuracy of your reporting.”gtag(‘set’, ‘userId’, ‘%%userid%%’);
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.