User ID Data Layer

Data layer push examples for tracking the user id.

purple cloud

Most websites and apps create a unique user ID to identify individual users. Including the user id in tags for GA4 and other platforms can greatly improve data quality. Each event data layer push can be used to test tracking tags by firing it in the browser console. These example data layer pushes can be used in a website or app tracking implementation by replacing the example values with dynamic or hard-coded values relevant to the specific application.

EventDescription
user_idPush this event on every page to reflect the unique user id associated with the user.

Google Tag Manager Solutions

Enhanced Ecommerce Data Layer

Recommended Events Data Layer