Přeskočit na obsah
ADD-ONS

User ID — Cross-device user identification

Adds a User ID header for cross-device tracking and linking web/app users.

10 min čtení Středně pokročilý Aktualizováno 5.6.2026

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

  1. Go to Dashboard → Add-ons
  2. Turn on the "User ID" toggle
  3. The power-up automatically detects the User ID from:

User ID sources

The power-up looks for the User ID in this order:

  1. The uid query parameter (e.g. ?uid=user123)
  2. The user_id cookie
  3. The _ga_uid cookie (custom)
  4. GA4 user_id from the measurement protocol POST data
  5. The GTM DataLayer user_id variable

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.

Pomohl vám tento článek?
✓ Děkujeme za zpětnou vazbu