- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
03-07-2017 04:23 AM
Hi
I´m configuring an app for mobile with Teamlium and Google Analytics. The app has two parts, one with login user and the other without.
When I logout the value of the uid parameter doesnt't reset to null and It's still sending to Google Analytics. I have other two custom dimensions with user datas that I´m able to clean setting them to null, but not with the uid.
Is there a way to do it? Anyone else with the same problem?
Thanks!
03-08-2017 09:52 AM
Hello @APM. Perhaps @christina_sund or @jason_koo can assist you?
03-17-2017 09:36 AM - last edited on 03-20-2017 10:04 AM by kathleen_jo
@APM, I'm not sure how you're persisting the uid /user ID while logged in - localstorage, cookie, native app variable, audienceStream enhanced item in IQ?
But regardless of the method, if you create a new, separate, data layer object that acts as the middle man, and then use that for the mapping to "uid" in the GA tag, that should take care of your issues. Just add the variable, then create a javascritp extension that feeds the variable from whatever your source is - but add in the conditions that you care about (i.e, only feed it when logged in). If you want to be extra safe, you could set the variable to null or delete it before filling it each time to make sure it doesn't persist in some angular/app frameworks.
That said - are you sure you want to do that? removing the UID from google will significnatly limit the analyitcs you can use it for. Especially for sessionsthat are closely linked to a individual person as app sessions are -even when someone isn't logged in, I'd expect a lot of use for being able to look at their entire session's activity in GA from unauthenticated to authenticated and back.
Also, if you aren't also reseting/clearing the cid/_ga cookie value, clearing the UID may not break the session analytics as much as you were hoping since non-UID properties will still catch the entire session..
Copyright All Rights Reserved © 2008-2023