DavidWells / analytics

Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors

Home Page:https://getanalytics.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove user_id as a custom dimension in google-analytics event payload

therealchrisrock opened this issue · comments

I'm reviewing the recommendations from google on how to handle user_id for GA4 and it states the following:

It is recommended that you do not register a user ID as a custom dimension.
Creating unnecessary high-cardinality custom dimensions, like User ID, negatively impact your reports and cause data to aggregate under the (other) row

It looks like the user_id is already pushed to the datalayer in the way they recommend but it looks like we're also sending the user_id as a custom dimension in the finalPayload for page and track events.