Reputation: 6185
After configure the google analytics property using GA4 instead of UA, I've seen there is something wrong with the user Id dimension.
As you can see in the following image seems like GA4 is not receiving data with the user_id property so it is unable to filter by the property.
By the way I'm referring to this property I'm using a Reporting identity
option called By User-ID and device
.
Seems like I have something wrong on my configuration, however when I use the DebugView tool of GA4 I can see the user_id is properly sent:
So I'm not sure what's going on here.
Why is Signed in with user ID
dimension disabled?
Upvotes: 7
Views: 3203
Reputation: 800
I was having problems with getting the user ID to send to GA4.
What resolved it for me was ensuring that it was always the absolute very first thing pushed to the dataLayer. For some reason if it was pushed "late", it would not be sent with ANY tracking events - even tracking events that occurred long after the userID was added to the dataLayer weren't working.
So, if anyone else is having trouble with this, try making sure your userID is set immediately when dataLayer is initialized, and before GA4 or GTM scripts are loaded:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
user_id: "your_user_id",
});
Upvotes: 1
Reputation: 6185
One day after "Signed in with user ID" is enabled without any additional configuration change. So it seems like it just needed some time to fit with data I guess.
Upvotes: 4