Skip to content
Tracking and technical

What is a user agent?

2 min read · Updated · By the Reveata team

Short answerA user agent is the text a browser or bot sends with every request in the User-Agent header to say what software it is, such as Chrome on Windows or GPTBot, which analytics tools use to report browsers and devices and to separate crawlers from people.

Every time a browser asks for a page, it introduces itself. That introduction is a single line of text, and it has grown long and confusing over the years because browsers copy each other's tokens to stay compatible with old websites.

What a user agent string looks like

A desktop browser sends something like this:

text
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36

It mentions Mozilla, AppleWebKit, Chrome and Safari, but it is Chrome. Software called a user agent parser reads strings like this and turns them into a browser name, a version, an operating system and a device type.

Crawlers name themselves in the same header. OpenAI's training crawler, for example, includes the token GPTBot, and Google's search crawler includes Googlebot. The crawler directory lists the tokens of the bots Reveata recognises.

What analytics tools do with it

  • Browser, OS and device reports. The parser works out whether a visit came from a phone, tablet or desktop.
  • Bot filtering. Requests whose user agent names a known crawler are kept out of visitor counts.
  • Cookieless counting. Some tools combine the user agent with other signals to tell visitors apart on one day without cookies.

How Reveata uses it

Reveata reads the user agent on its server to derive browser, operating system and device type. It keeps the browser's major version only (for example 129) and the operating system's major and minor version, and infers nothing beyond what the string says.

The same header drives bot detection. Every request is checked against a list of known crawlers and AI agents, plus a general bot detector. Recognised bots are stored as bot hits, separately from your visitors, and never count as visits (Bot and AI crawler traffic).

In cookieless mode, the server identifies a visitor for one day with a hash of a random daily salt, your website, the IP address and the user agent. The salt is deleted after its day, so the hash cannot be traced back.

Why a user agent cannot be trusted alone

The header is just text, and anyone can set it. Scrapers often claim to be Googlebot or GPTBot because sites let those through. Reveata therefore checks crawler requests against the IP ranges their operators publish and marks them verified, spoofed or unverifiable (crawler verification). Browsers are also trimming what they send: some reduce the detail in the string to make people harder to fingerprint, so very precise version or device reports are getting rarer.

Frequently asked questions

How do I find my own user agent?

Open your browser's developer tools, go to the Console and type navigator.userAgent. The string it returns is what your browser sends with each request.

Can I block a bot by its user agent?

You can ask it to stay away in robots.txt, which uses the bot's token, and well-behaved crawlers follow it. A bot that fakes its user agent will ignore such rules, so blocking it reliably needs your server or network firewall, often by IP address.

Why does a visit show an unknown browser?

The user agent was missing, unusual or too short for the parser to recognise. Embedded app browsers and privacy tools sometimes send stripped-down strings.

See it with your own numbersReveata ties every visit and sale to the source that brought it. Add your website in a minute.
Get started
Was this page useful?
GlossaryWhat is bot traffic?Bot traffic is the share of requests to your website made by automated software, such as search engine crawlers, AI crawlers, uptime monitors, link previews and scrapers, rather than by people using a browser.GlossaryWhat is crawler spoofing?Crawler spoofing is when a bot sends a user agent that claims to be a well-known crawler, such as Googlebot or GPTBot, without coming from that crawler's operator, usually so that a scraper gets past filters that let trusted crawlers through.GlossaryWhat is a web crawler?A web crawler, also called a spider or bot, is a program that automatically fetches web pages, follows the links it finds and stores what it reads, usually to build a search engine index, an archive or a dataset.GlossaryWhat are Core Web Vitals?Core Web Vitals are three measurements Google uses to describe a page's real-world user experience, namely Largest Contentful Paint (loading), Interaction to Next Paint (responsiveness) and Cumulative Layout Shift (visual stability).GlossaryWhat are event properties?Event properties are key–value details attached to an analytics event, such as the plan chosen or the button clicked on a signup event, so you can break one event down by those details instead of creating a separate event for every variation.GlossaryWhat is a canonical URL?A canonical URL is the one preferred address you want search engines to index and show for a page whose content is reachable at several URLs, usually declared with a rel="canonical" link in the page's head.