User Agent Info

How to use automatic User Agent enrichment in your owntag Server Side GTM Container

owntag can automatically parse the User-Agent header of each incoming HTTP request and enrich it with structured device information. This lets you access browser, operating system, and platform details directly as HTTP headers in your Server Side GTM Container.

Available Headers

When User Agent Info is enabled, the following headers are added to each request:

HeaderDescriptionExample
x-owntag-device-mobile"true" if the device is a mobile phone, "false" otherwise. Tablets are "false".true
x-owntag-device-osOperating system nameWindows, macOS, Android, iOS
x-owntag-device-browserBrowser nameChrome, Safari, Firefox
x-owntag-device-browser-versionFull browser version string120.0.6099.109
x-owntag-device-engineRendering engine nameBlink, WebKit, Gecko
x-owntag-device-engine-versionRendering engine version120.0.6099.109
x-owntag-device-platformPlatform typedesktop, mobile, tablet

Use in Server Side GTM

You can use these headers anywhere in tags, triggers, and variables by creating a “Request Header” type variable for each.

For example, a variable configured for x-owntag-device-browser would let you reference {{header.x-owntag-device-browser}} in your tags or triggers.

Example use cases:

  • Analytics enrichment: Send browser and OS details to Google Analytics as custom dimensions without relying on Google’s UA parsing
  • Platform-specific triggers: Fire certain tags only for mobile users or only for desktop users
  • Conditional tag logic: Vary tag behavior based on the detected browser or operating system
  • Ad platform optimization: Pass device information to conversion APIs (Meta CAPI, TikTok Events API) for improved attribution

How It Works

The parsing is performed entirely on owntag’s servers — no external services are called and no data is shared with third parties.

If the User-Agent header is missing or cannot be parsed, all enrichment headers are set to empty strings. This ensures downstream consumers can always expect the headers to be present.

The accuracy of User-Agent parsing depends on the browser sending a meaningful User-Agent string. Modern browsers (especially Chromium-based) are increasingly “freezing” parts of the User-Agent string for privacy. For the most accurate detection, consider also using Client Hints in the future. owntag’s User Agent Info provides a solid baseline that works with all browsers today.

Enabling User Agent Info

You can enable User Agent Info in the owntag Console under your container’s settings. Navigate to User Agent Info in the sidebar and toggle the feature on.