What is the User ID add-on?
The User ID add-on automatically adds an X-DataNostro-User-ID header to all requests if a User ID is available in the request (from a cookie, query param, or POST data).
Why use User ID?
- Cross-device tracking: Link the same user across PC, mobile, tablet.
- Logged-in users: Track logged-in users across sessions.
- Enhanced Conversions: Send a hashed User ID to Google Ads/Meta.
- CRM sync: Link web tracking with CRM data.
How to activate
- Go to Dashboard → Add-ons
- Turn on the "User ID" toggle
- The power-up automatically detects the User ID from:
User ID sources
The power-up looks for the User ID in this order:
- The
uidquery parameter (e.g.?uid=user123) - The
user_idcookie - The
_ga_uidcookie (custom) - GA4
user_idfrom the measurement protocol POST data - The GTM DataLayer
user_idvariable
The added header
X-DataNostro-User-ID: user_abc123xyz
Integration with the Custom Loader
If you have the Custom Loader active, you can set a user_identifier field that's automatically inserted into the GTM DataLayer:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'user_id': '{{ user_identifier }}',
'event': 'user_identified'
});
Enhanced Conversions with User ID
In the GTM server-side Google Ads tag use the User ID for Enhanced Conversions:
const userId = getRequestHeader('X-DataNostro-User-ID');
if (userId) {
// Send hashed User ID to Google Ads
enhancedConversionData.user_data = {
hashed_user_id: sha256(userId)
};
}
⚠️ Privacy notice:
A User ID is PII (personally identifiable information). Make sure you have consent from the user before using User ID tracking. We recommend hashing the User ID before sending it to 3rd-party platforms.