The X-UserAgent add-on allows you to directly identify the device the visitor is using to interact with your content.
The X-UserAgent add-on allows you to directly identify the device the visitor is using to interact with your content.
This addon works by extracting the device information from the user-agent header which is set by the visitor's browser on each request.
There is a great variety of user-agent header strings, and this addon covers the most used ones, but in some cases of exotic or brand new browsers/devices, it can fail with the identification of some parameters.
Once you enable this addon, all the requests coming from your website will contain the following X-Headers:
Chrome/Firefox/Safari/Edge/...
The version of the web browser.
AppleWebKit/Gecko
The version of the device engine.
True/False
Linux/Windows/Mac OS X/iOS/Android
To use the xUserAgent addon, you simply need to go sprtags.io Containers -> Add-ons -> xUserAgent and enable it:
Once enabled, you can just open the preview mode of the server side container and see that the new headers with the new user agent information are present.
To send requests to the server side container and make them show on the preview mode, you will need to open the preview mode of your web container and debug your website.
If we inspect the incoming HTTP request, we should be able to see the X USER AGENT headers with the device information:
With xUserAgent disabled:
With xUserAgent enabled:
As you can see in the screenshot, all the information was detected successfully.
According to the new headers, the user was browsing with Google Chrome and making use of a computer with Linux.
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 device information with your tags.