The X-User-ID header, is a simple tool that generates an unique hash for each website visitor.
The X-User-ID header, is a simple tool that generates an unique hash for each website visitor.
This allows you to attribute the events to the user without the need of making use of cookies or other identifiers.
The userid hash is generated with combination of IP, User Agent and Hostname.
The idea of this add-on is to offer a simple way of non-intrusive fingerprinting that makes use of the request information only.
Please, note that IP address rotation policies of the ISP of the user and the use of a VPN can affect the functionality of this add-on.
Once you enable this addon, all the requests coming from your website will contain the X-User-Id header.
To start making use of this addon, you simply need to go the sprtags.io dashboard and enable it:
Now we can test it by opening the web container on preview mode, or by using curl.
To use curl: Click on the three dots at the top right of the screen:
Click on send requests manually, copy the command and execute it:
To execute the command follow the instructions below, paste it, and press enter (↵.):
Windows:
Open Command Prompt or PowerShell on your Windows machine. You can find Command Prompt in the Start menu, or use the Windows key + R to open the Run dialog box and type cmd.
Mac:
Open Terminal by using the Spotlight search or by pressing Command (⌘) + Option + T on your keyboard.
If we inspect the incoming HTTP request, we should be able to see the X GEO headers with the location information.
With xUserId disabled:
With xUserId enabled:
To map these headers to gtm tags you have to go to your server side container and:
If we reopen the preview mode and repeat the tests, the variables with the header values will be showing:
Now, you are ready to send the user id with your tags.