Glossary · Tracking technology

What is user agent?

A user agent is the text string a browser, app or bot sends in the User-Agent HTTP header to identify its software, version and platform to the server it's requesting from.

Also called: User-Agent header, UA string

Updated

How to read a user agent string

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

This is Chrome 129 on a Mac. The Mozilla/5.0, AppleWebKit and Safari tokens are historical compatibility baggage that nearly every browser includes. Chrome's user-agent reduction freezes the macOS version at 10_15_7 and minor version numbers at zero; precise details are available on request through User-Agent Client Hints (Sec-CH-UA-* headers).

User agent examples

ClientDistinctive part of the user agent
Safari on iPhoneiPhone; CPU iPhone OS 18_0 like Mac OS X … Version/18.0 Mobile Safari
Firefox on WindowsWindows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
Googlebotcompatible; Googlebot/2.1; +http://www.google.com/bot.html
OpenAI training crawlercompatible; GPTBot/1.2; +https://openai.com/gptbot
Command-line clientcurl/8.4.0

What analytics uses the user agent for

  • Browser, operating system and device-type reports.
  • Bot detection — declared crawlers, headless browsers and HTTP libraries.
  • In some cookieless designs, one input to a short-lived visitor hash.

User agent pitfalls

  • Anyone can fake it. A scraper can claim to be Googlebot; verify crawlers by reverse DNS.
  • Reduced detail. Exact OS versions and device models increasingly come only from Client Hints.
  • Tablets. iPads request desktop sites by default and report as Macs.
  • Fingerprinting. Combined with other attributes, the UA contributes to device fingerprints — see browser fingerprinting.

How VisitTrack uses the user agent

VisitTrack parses the user agent into device, browser and OS for the dashboard; feeds it to bot filtering (headless, automation and HTTP-client user agents, and several hundred declared crawler patterns from the open-source isbot project); checks it against the browser's actual capabilities to catch mismatches; and, in cookieless mode, uses it with the IP and a daily salt to derive the visitor id. The raw user agent is used for those decisions; what's stored is the derived browser, OS and device. Try a string in the user agent bot checker.

Frequently asked questions

What is my user agent?

It's the string your browser sends with every request, describing the browser, version and operating system. Any user agent checker page will show yours, and in JavaScript it's available as navigator.userAgent.

Why do all user agents start with Mozilla/5.0?

For historical compatibility. In the 1990s servers sent better pages to Netscape (Mozilla), so other browsers copied the token, and it stuck. It carries no real information today.

Related terms

Tools and guides

See which channels actually bring paying customers

VisitTrack is cookie-free analytics with revenue attribution built in. One script tag, no consent banner, live in two minutes. 14 days free, no card required.