# Devices

### Device targeting

All tests in Shoplift can be segmented to all devices, desktop devices, or mobile devices.

#### Mobile segments

When a test is segmented to mobile devices, only visitors coming to your website from devices of that category (including tablets) will be shown the test.

#### Desktop segments

When a test is segmented to desktop devices, only visitors coming to your website from desktop computers or laptops will be shown the test.

{% hint style="info" %}
**FAQ: How does Shoplift determine if a device is mobile or desktop?**

To determine if a device is mobile, tablet, or desktop, we look at the user agent sent by the browser.
{% endhint %}

### How to view a mobile test

#### On a mobile device

If you segment your test to mobile devices only, the easiest way you can view your test is by navigating to your tested page(s) on a mobile device in an incognito or private browser tab. If you aren't served the test variant, you can close the tab and navigate again until you are served the test variant.

As Shoplift uses local storage to track visitors, closing and reopening incognito or private tabs will clear the tracker so that you can be served both variants in the test.

#### On your computer

If you want to view a test segmented to mobile devices on your computer, you can do so by emulating a mobile device in your browser. If you don't know how to do this, don't worry - it's easy with a chromium-based browser like Google Chrome or Brave.

<figure><img src="https://314821113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDg2m2UmvTCMjmBjnzBKA%2Fuploads%2FLqBzDv04znNn4tyIUJKn%2FScreenshot%202024-06-12%20at%204.46.57%20PM.png?alt=media&#x26;token=cb50ac9a-ad53-4dee-a9ba-a31e136afdb5" alt=""><figcaption></figcaption></figure>

1. Open an incognito tab in your browser
2. Open the Developer Tools by clicking View > Developer > Developer Tools, or using Command + Shift + C (on Mac) or Control + Shift + C (on Windows).
3. This will open the developer tools window. In the top center of the screen, you can select a mobile device from the "Dimensions" dropdown. This will change your user agent to a mobile device.
4. Navigate to your tested page(s). You will now be placed in the A or B version of your test.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shoplift.ai/test/targeting/device.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
