Device Targeting
Restrict an experiment to mobile, tablet, or desktop visitors. How Split Test Pro detects device type, when device targeting beats a media query, and how to read device-segmented results.
Device targeting limits an experiment to a subset of devices — mobile, tablet, or desktop. It’s a per-experiment setting, not per-variant, so all variants in the experiment share the same device filter.
How Device Detection Works
Split Test Pro classifies devices using User-Agent string parsing at the moment of variant assignment:
- Mobile — phones, including iPhone and Android handsets.
- Tablet — iPads, Android tablets, certain Windows tablets.
- Desktop — everything else.
Detection runs in the script (HTML extension or Shopify Theme App Extension), so it happens on the visitor’s browser at page-load time. There’s no viewport-width fallback — if a visitor on a phone resizes their browser to a wide window, they’re still classified as mobile.
When to Use Device Targeting
Use it when:
- The change you’re testing is only visible on one device class — a sticky mobile add-to-cart bar shouldn’t run an A/B test on desktop where it doesn’t render.
- The conversion behavior differs structurally by device — for example, mobile users go through a different checkout flow.
- You want clean, segmented results — by restricting an experiment to one device class, you sidestep the noise of mobile and desktop conversion rates being averaged together.
When Not to Use Device Targeting
Don’t use it when:
- The change is purely visual and wraps in a
@mediaquery. Use the media query inside the variant instead — you’ll collect more data because the experiment runs on all devices. - You want to see device breakdowns for an existing experiment. You don’t need device targeting for that — segmented results show device breakdowns regardless. See Segmenting Results.
- You want different variants per device. Device targeting filters which devices run the experiment; it doesn’t conditionally show different variants. For per-device variant content, run separate experiments for each device class.
Setting It Up
In the Targeting tab, find the Device Targeting section. By default, an experiment targets all devices. To restrict it:
- Pick the device class(es) you want to include — Mobile, Tablet, Desktop, or any combination.
- Save.
Multiple device types are combined with OR (a Mobile + Tablet experiment runs on phones and tablets, but not desktops).
If no device targeting is configured, the experiment runs on every device — the same behavior as picking all three.
Device Targeting + URL Targeting
Both filters apply: a visitor must match the URL targeting AND the device targeting to be assigned to a variant. They combine with AND across the two filter types (within URL targeting, multiple rules combine with OR — see URL Targeting).
URL: Path starts with /products/ + Device: Mobile only
↓
= Visitor on /products/widget on a phone → assigned a variant
= Visitor on /products/widget on desktop → not assigned
= Visitor on /collections/featured on a phone → not assigned (URL doesn't match)
Reading Device-Segmented Results
Even on an experiment that targets all devices, the Results page lets you filter the report by device. Use this when:
- The experiment is broadly targeted and you want to see whether mobile and desktop visitors responded differently.
- You suspect a regression on one device class even though aggregate numbers look fine.
See Segmenting Results for the full flow.
Common Mistakes
- Targeting only mobile when the experiment doesn’t need it. You’ll collect data more slowly than necessary. Default to all-device targeting and segment in the results report.
- Confusing device targeting with responsive design. Device targeting decides who runs the experiment. A
@mediaquery inside a CSS variant decides how the variant looks on different sizes. They’re complementary, not interchangeable. - Expecting tablet behavior to mirror mobile. iPads in particular are a wildcard — newer ones identify as desktop in the User-Agent string Apple ships, others identify as iPad. Test on a real tablet if your variant is tablet-critical.
- Trying to target by exact device model. Split Test Pro classifies into three buckets only. iPhone vs Pixel vs Galaxy is not a distinction the platform makes. Use a JS variant for finer-grained branching.
What If My Visitor’s User-Agent Is Faked?
Bots, headless browsers, and developer tools can set arbitrary User-Agent strings. The classifier does its best; if it can’t decide, it defaults to desktop. For rigorous filtering of bot traffic from your results, see your analytics tool — Split Test Pro doesn’t currently strip bot sessions.
Next Steps
- Combine device targeting with the right URL filter: URL Targeting.
- Look at how a single experiment performed across devices: Segmenting Results.
- Test a mobile-only change without filtering at the experiment level: CSS Variants (use
@media).
Ready to start testing?
Install Split Test Pro and run your first experiment today.