Device & Browser Targeting
Device and browser conditions let you limit an experiment to visitors using a specific type of device or a specific browser. This is useful when a design change has a different effect on mobile than on desktop, or when you are testing a fix for a browser-specific bug.
Device conditions
A vs B classifies every visitor into one of three device categories:
- Desktop — traditional computers and laptops with larger screens and mouse-based interaction.
- Mobile — smartphones and small-screen touch devices.
- Tablet — tablets such as iPad and Android tablets, which sit between mobile and desktop in screen size.
In the Audience Builder, add a condition of type Device and select one or more device types. You can use the Is operator to include a device type or Is Not to exclude it.
Browser conditions
Browser conditions let you target visitors using a specific web browser. A vs B supports the following browsers:
- Chrome — Google Chrome and Chromium-based browsers
- Firefox — Mozilla Firefox
- Safari — Apple Safari (desktop and iOS)
- Edge — Microsoft Edge
- Opera — Opera browser
- Samsung Internet — Samsung's built-in Android browser
In the Audience Builder, add a condition of type Browser and select the browser you want to target.
How detection works
Both device and browser detection are performed by the A vs B snippet at load time by parsing the visitor's user-agent string. The snippet reads navigator.userAgent, checks it against known patterns for each browser and device category, and stores the result for the duration of the session.
This happens instantly when the snippet loads — before any experiments run — so device and browser conditions are evaluated with no additional delay.
Common use cases
Mobile-specific experiments
Testing a redesigned mobile navigation? Add a Device condition of Mobile to your audience so that desktop visitors are never shown the mobile layout. This prevents desktop users from seeing a design that was not built for their screen size.
Browser-specific fixes
If you discover a layout bug that only affects Safari, you can run an experiment targeting only Safari users to test a CSS fix before rolling it out to everyone. Add a Browser condition of Safari to your audience.
Comparing desktop and mobile results
Run a single experiment on all visitors without any device targeting, then use the Segment filter on the Results page to view results broken down by device type. This tells you whether your change worked differently on mobile vs desktop without needing to run separate experiments.