Device criterion

👉 The Device criterion is both a segmentation criterion and a triggering criterion.
It enables you to create a segment or a trigger

📖 Definition

The Device criterion enables you to restrict the visibility of a campaign to visitors based on the device they are using for their current session.

⚙️ Configuration

The configuration of the Device criterion is the same for segments and triggers.
When you are using this criteria, you need to choose between two operators : 

  • Is: will include the selected value
  • Is not: will exclude the selected value  

Then, select the device you want to include or exclude (according to your previous selection) in the second dropdown list: 

  • On mobile: users using their mobile device when visiting your website
  • On tablet: users using their tablet device when visiting your website 
  • On desktop: users using their desktop when visiting your website 

To include two devices, you need to exclude the third one.
For example, if you want to target users on mobile and tablet, you need to exclude desktop visitors. 

On the contrary, if you want to exclude two devices, you need to include the third one.
In this example, mobile visitors are included. Therefore, desktop and tablet visitors are excluded from the targeting.

🚩 Heads up

Visitors browsing on tablet using Safari are recognized as desktop visitors. In this case, we recommend adding a Screen size criterion to include or exclude these visitors. 

💡 Use case

If you have a mobile application, you may want to display a message encouraging users of the mobile website to download the mobile application. In this case you need to display the campaign to mobile users only. To do so, select is > on mobile in the segment of your campaign.

🔎 How does it work?

We store the device information in the session storage inside the “ABTastyUA” location. We call a specific service on our side to write and assign a value inside that variable, usually when the first page of the session loads. Three values are assignable:

  • ‘Mobile phone’
  • ‘Tablet’
  • ‘Desktop’ 

When you manually QA a campaign, make sure to clear your storage if you artificially change your user agent (using the mobile mode from the browser for example). That way, AB Tasty will assign a new value in ‘ABTastyUA’ as it was your first visit. 

To interpret the browser user agent, AB Tasty uses an external service called “Yauaa”, which allow us to do the conversion between the user agent and our homemade values. 


Need additional information?

Submit your request at

Always happy to help! 


Was this article helpful?