User ID power-up
Updated Nov 10, 2026
The User ID power-up generates a persistent, privacy-friendly identifier and appends it to every request processed by your sGTM container. It works by hashing non-personally identifiable signals (user IP, user-agent string, hostname, and TLS settings) into a stable user ID that helps maintain tracking continuity even when cookies are restricted. This generic identifier is attached to all incoming requests through the X-Stape-User-Id header. Because it operates exclusively within server-container request headers, it’s never saved as a browser cookie or used to identify specific individuals.
The identifier remains persistent across browser sessions even after closing the browser, as long as the signals (IP address, user-agent, TLS settings, and hostname) remain unchanged. The power-up evaluates IPv6 signals when supported by the user's provider, defaulting to IPv4 otherwise.
Since hostname is part of the hash, the same user gets a different X-Stape-User-Id on each domain. If your users move between several domains (for example, from your main website to a checkout on a separate domain), you can also enable the Cross-domain ID option. It adds an additional X-Stape-Cross-Domain-Id header, generated from the same signals except hostname, so the same user gets one ID across all domains that send requests to your sGTM container. The standard X-Stape-User-Id keeps working as before.
Notes:
- User ID is incompatible with the Anonymizer power-up. When Anonymizer is active, remove the User ID parameter in the settings, and keep the User ID power-up disabled.
- Cross-domain ID helps you track the same user across multiple domains by assigning them a shared identifier. Learn more in our guide on multi-domain tracking.
- To connect multiple custom domains to one sGTM container, use the Multi-Domains power-up.
- While the Stape User ID acts as a valuable fallback when cookies are unavailable, it isn’t a direct substitute for the master cookie.
User ID is available on the Free subscription plan and higher.
How to set up User ID
1. Log in to your Stape account and select your sGTM container from the dashboard.

2. Go to Power-ups , scroll down to the Data enrichment section, and click on the User ID panel.


3. Toggle the User ID switch to enable it and click Save changes.

4. Go to your sGTM container in Google Tag Manager.
5. Click Variables and click New.

6. Set the variable type to Request Header.

7. Give the variable the X-Stape-User-Id name and click Save.

8. Create a User-Defined Variable in the sGTM container with the type Request Header and enter the name X-Stape-Cross-Domain-Id.

Testing
1. Open the sGTM container preview on one of your domains.
2. Go to the Request tab → click Incoming HTTP Request.

3. Find the X-Stape-Cross-Domain-Id header in the Request Headers section and save its value.

4. Navigate to the next domain.
5. In Incoming HTTP Request, check the X-Stape-Cross-Domain-Id header in the Request Headers section and compare its value with the one saved from the previous domain.
6. If the X-Stape-Cross-Domain-Id header has the same value on both domains, the power-up is working correctly.
Use case #1
A sample scenario is an eCommerce store that relies on remarketing campaigns to re-engage users. Their campaigns show strong reach metrics, but audience sizes are smaller than expected and frequency is inconsistent, because a large share of returning visitors are unrecognized across sessions, they fall out of remarketing pools and are never re-engaged.
You can identify this problem and fix it this way:
- 1.In Google Ads, compare your remarketing audience sizes against your actual returning visitor volume from GA4 for the same period. If your audience within the last 30 days is significantly smaller than the returning users count in GA4, cookie loss is preventing consistent user recognition.
- 2.Enable the User ID power-up and create a Request Header variable in sGTM with the Header Name
X-Stape-User-Id. - 3.Monitor your remarketing audience sizes over the following 2-4 weeks and compare them against the baseline period.
If cookie blocks were previously causing returning visitors to be dropped from audiences, you should see remarketing pool sizes grow as the hashed identifier allows the same users to be consistently recognized across sessions.
Use case #2
A sample scenario is cross-domain tracking, where a visitor lands on one domain and then navigates to another domain to complete a purchase.
Since first-party cookies are not automatically shared between different domains, advertising platforms may lose important identifiers used for user matching and conversion attribution.
GA4 has a built-in cross-domain tracking mechanism, but most advertising platforms do not. In this example, we'll use the Cookie reStore tag and the Meta _fbc cookie to demonstrate how to preserve cookie values across domains.
1. In your web GTM container, create a tag with the event name cookie_store that fires on Domain 1, for example, your landing page. This tag will be used to store cookies.


2. Create another tag with the event name cookie_restore that fires on Domain 2 when the referrer is Domain 1.


3. In your sGTM container, create a Cookie reStore tag using rh - X-Stape-Cross-Domain-Id as the identifier. Specify the cookies you want to store and their Lifetime in seconds. Use the cookie_store trigger.

4. Create another Cookie reStore tag with the same settings, but use the cookie_restore trigger and enable Only restore cookies.

5. Enable Data Store in your Stape container.
6. Open Domain 1 with the ?fbclid=test123 query parameter appended to the URL. For example, https://domain1.com/?fbclid=test123.
7. Right-click the page → Inspect Element → Application/Storage → Cookies.
8. Find the _fbc cookie and save its value.

9. Navigate from Domain 1 to Domain 2.
10. Right-click the page → Inspect Element → Application/Storage → Cookies.
11. Find the _fbc cookie and compare its value with the one saved from Domain 1.
12. If the _fbc cookie has the same value on both domains, the cookie restoration is working correctly. This helps preserve advertising click identifiers across domains and supports more accurate conversion attribution.
Was this article helpful?
🍽 Table of content:
Comments