How do I send user ID to GA4 with GTM? - google-analytics

How do I send user ID from Google Tag Manager to Google Analytics 4?
My Configuration Tag has its user_id field set:
In order to define user_id in the configuration event, I have configured sequencing after login:
Indeed, in the GTM debugger I can see the value:
I can see crm_id in the realtime dashboard in GA4:
I can see both crm_id and user_id in the GA4 DebugView:
And yet, when I test on two separate devices logged into the same user, my realtime events register as 2 separate users:
Additionally, I have enabled Google signals data collection:
Am I misunderstanding how user ID works in GA4? It was my impression that these two sessions on separate devices should be collapsed into the same user, but nothing I try seems to be effective.
I appreciate any and all assistance.

Related

Does Firebase Analytics link data to user identity?

I am trying to publish my React Native iOS app (which uses Firebase Analytics) on the App Store. The App Store requires me to specify what data is linked to the user.
The problem is: I cannot figure out whether Firebase Analytics links the data it collects to the user identity.
Specifically, I am unsure if Firebase Analytics links data from the following categories to the user identity: Contact Info, Identifiers, Diagnostics, Location, Usage Data, and Other Data. Can anyone advise?
I found Google documentation explaining how to enable/disable privacy settings: Privacy controls in Google Analytics
For location data, they state: "You have the option to enable/disable the collection of granular location-and-device data on a per-region basis. Analytics collects this data by default."
For user level data acccess, they state: "For Universal Analytics properties, you can pull event information for any given user identifier via the User Explorer report or the User Activity API. These features allow you to analyze and export event level data for a single user identifier. " -- I think this means that the data is in fact linked to user identities if you use Firebase Analytics.

How Does Firebase Analytics count New Users in Web App

We have a web app that users log into using Firebase Auth. According to our the authentication section of our firebase console, we have 690 user that have created accounts, and we believe that is correct.
According to our Firebase Analytics console, we have 2,100 new users in the past 90 days. I think I understand that Firebase Analytics tracks users with a device ID (?). So, if this were a iOS app, an uninstall and install would trigger a a new user counted in analytics. But, how does this work on a web app? Cookie? Some kind of browser id? A session?
So, I think if we want to track unique users accurately, we would use the set the user id, with this:
https://firebase.google.com/docs/reference/js/firebase.analytics.Analytics#setuserid
Which according to the docs linked above, 'Use gtag 'config' command to set 'user_id'. So it does this: https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id#set_user_id
Which allows the users to be tracked across sessions. Therefore, users should not double count.
Notice that the setUserId section in the firebase analytics docs does not have a web section (although the setUserID function does exist in the javascript sdk as shown tow links above) https://firebase.google.com/docs/analytics/userid
So... would it then work to get the user id (uid) when they log in (https://firebase.google.com/docs/reference/js/firebase.User). And then use the setUserId method to set the id?
It's unclear because the documentation does not seem to be in one source. I am just trying to put it all together
You are correct that you can use the setUserId API (across iOS, web and Android) in order to identify the same user across platforms. Note that you'll need to:
Set the default reporting identity to "By User-ID then Device" in the Reporting settings for Google Analytics in the Firebase console (see attached screenshot and docs for more info).
Make sure you are following the Privacy Policy when using the User ID.

Client ID is missing when I try to create a Custom Report in Google Analytics

I see other posts saying that I can create a custom report in Google Analytics and use client ID as a dimension but I don't have client ID as a dimension even after setting up the User-ID View.
I'm tracking the usage of a Google Data Studio Report with Google Analytics and I can see data pulling through to the User Explorer but there's no Client ID field in the Custom Report Dimension drop down box. Do I need to set up something else?
First
Client id and user id are different identifiers.
Client id is a just randomly generated UUID v4 used in GA to identity visitors. It’s stored in _ga cookie so, I.e. if I’ll visit your site from 2 different browser there will be 2 different client ids.
User id is a field to store user id from your own authentication system. You can use it for cross platform and cross browser user tracking.
Second
Client id aren’t one of default dimensions in GA. To have it as a dimension you have to read it from _ga cookie or from model object and set it as a custom dimension.

Delete without ClientID - User Deletion API Google Analytics

I have a question regarding User Deletion API for Google Analytics. We have a Property and View that does not collect UserID or ClientID as Custom Dimension, but we have a lot of PII data in our Events report (emails and phone numbers).
When i go to User Explorer i can get the ClientID, but unfortunately as far as i know this report is not available in any API versions of Google Analytics.
My question is HOW can i then delete all these PII without knowing the ClientID? I do not have a 360 account.
Unfortunately I think you've done your research correctly and I'm afraid there aren't more options available than what you already listed:
You have 2 ways of deleting data:
User Deletion API
Deleting views (I know it's too radical, but that's the only other option)
As for option 1, indeed, none of the reporting APIs expose the Client ID or the User ID, so you have 2 options:
Export the Client ID manually from the User Explorer report, but you won't be able tell which PII is associated with which Client ID
Implement a custom dimension to store the Client ID so you can then identify the corresponding PII, and automate that process if you want to

How to export acquisition channel from GA?

I use Google Analytics to track an acquisition channel for android and ios users. How can I export a list of users with user's ID and acquisition channel? Programmatically via Query explorer or manual exporting alternatives are welcome.
I can export a list of users without acquisition channel field in User Explorer. But this field is presented on detailed page.
The one of the possible ways is
1. Create a custom dimension in GA to store User ID. User ID might be your own generated key of user.
2. Sending this User ID to GA from your mobile app.
3. Build a query to selecting needed information in GA reporting.
More information here https://www.mugo.ca/Blog/Tracking-individual-users-in-Google-Analytics

Resources