user_id
GA4 data layer that reflects the unique user id associated with the user. Use this to data layer to pass the user_id to the GA4 configuration tag.
Example dataLayer push for “user_id“.
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
user_id: "0123456789"
});
Google Tag Manager Solutions
Enhanced Ecommerce Data Layer
Recommended Events Data Layer