> For the complete documentation index, see [llms.txt](https://docs.zigpoll.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zigpoll.com/polls/targeting-settings.md).

# Targeting Settings

Control who sees your surveys

Open a survey and go to **Settings → Targeting**. Targeting settings control who gets to see your survey. This may be useful if:

* You want to limit surveys displayed to a certain country or language
* You only want to survey people who come from a specific traffic source (paid ads, Google)
* You only want to survey people on mobile / desktop

You have access to the following settings:

<figure><img src="https://1643988190-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZpanNFqg3aCUZgXh3X%2Fuploads%2FGIiJXtc2NVALfHHIO8Zu%2Fimage.png?alt=media&amp;token=908d5df3-28f0-4376-9819-3f8b87ae369e" alt=""><figcaption></figcaption></figure>

#### Percentage

The percentage of visitors who see your survey. For example, at 50%, one out of every two visitors is shown your survey. Visitors are picked at random.

#### Referral

Shows your survey only to visitors from a traffic source you choose. For example, if you select "Traffic to your site from a search engine", only visitors who found you through Google, Yahoo, Bing and similar see your survey.

You can also limit a survey to paid traffic (visits with an ad engine UTM), specific referring sources, or organic traffic.

#### Country

Shows your survey only to visitors from the countries you choose. Use it to target your domestic or international customers. Location comes from the visitor's IP address.

#### Region

Narrows a survey to specific states, provinces, or regions (for example California or Ontario). Regions are listed with their country and matched on their ISO 3166-2 code, so the same rule works across countries. Like Country, this uses the visitor's IP address. If a region can't be determined, the rule is skipped instead of blocking the survey.

#### Browser

Surveys only visitors using a specific browser (Chrome, Safari, Firefox, Internet Explorer, or Edge). Use it to investigate your experience on a particular browser.

#### Device Type

Surveys visitors based on their device: mobile, tablet, or desktop. Use it when an experience or a question only applies to one kind of device.

#### Language

Shows surveys only to customers with matching languages, or hides them from those languages. Use it to survey a specific group of customers, such as French speakers.

Where the language comes from depends on where the survey shows:

* **On your site**, Zigpoll reads the page's `<html lang>` attribute, which Shopify themes set to the storefront language. If the page has none, it uses the visitor's browser language. A `?lang=` parameter in the page URL overrides both.
* **On Shopify checkout, Thank You and Order Status pages**, it uses the language the customer is checking out in, as reported by Shopify.

A base language matches every region: a rule for `fr` catches `fr-FR` and `fr-CA`. A regional rule such as `fr-CA` matches only that region, plus visitors whose page reports just `fr`.

To translate your survey, see:

{% content-ref url="/pages/-LrVMaacbU4WTFf6p6i5" %}
[Language and Translations](/polls/language-settings.md)
{% endcontent-ref %}

#### IP Address

Restricts your survey to a specific set of IP addresses, or hides it from them. To cover a whole range, use CIDR notation (for example `203.0.113.0/24`). This is useful for excluding your own office or agency from results.

#### Hostnames

Shows a survey only on certain domains, or everywhere except certain domains. The rule matches the domain the survey appears on, for example `shop.example.com` versus `staging.example.com`. One account can then show different surveys on production and staging, or on several storefronts.

#### Metadata

Shows a survey only when certain metadata is present, or only when it is not. Each entry is a key and value pair that must match exactly. Metadata includes:

* What your site passes to Zigpoll (see the JavaScript API).
* Values Zigpoll records automatically, such as `utm_source`, `utm_medium`, `utm_campaign`, `landing-page`, `original-referrer`, and the browser language.

For example, `utm_campaign` = `spring-sale` shows a survey only to visitors who arrived through that campaign.

#### Visitors

Shows the survey to first-time visitors only, or to returning visitors only. Zigpoll counts visits in the visitor's browser, so a visitor who clears site data or switches devices counts as new again. A visitor who lands through an email or SMS link (`utm_medium=email` or `sms`) counts as returning on their first visit, since they already know your brand. To target by *purchase history* on Shopify, use the Customer rules below instead.

#### Page Views

Shows a survey only after a visitor has viewed a certain number of pages. Use it to wait until customers have had time to explore your website.

<figure><img src="https://1643988190-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZpanNFqg3aCUZgXh3X%2Fuploads%2FLKrXBiJmVrLURrZDYC5i%2Fimage.png?alt=media&amp;token=9dfbaff7-bda3-429c-801f-18baa99f511b" alt=""><figcaption></figcaption></figure>

### Stripe and Square Targeting Rules

Surveys triggered by Stripe or Square events get their own rule section (see [Stripe](/integrations/stripe.md) and [Square](/integrations/square.md)). Use it to show a survey only for payments that match:

* An amount or currency.
* A metadata value.
* Specific product or price IDs (Stripe), or item IDs (Square).

### Shopify Targeting Rules

On Shopify, you can show a survey only to certain groups of customers. These settings appear automatically for every on-site survey on a Shopify store. They also appear for surveys using a Shopify-specific delivery method, such as Thank You & Order Status, Order Status Only, Checkout Steps, or email/SMS triggers.

#### Where each rule group applies

| Placement                                                   | Customer rules                   | Cart & Order rules                          |
| ----------------------------------------------------------- | -------------------------------- | ------------------------------------------- |
| On-site: widget, exit intent, embedded with page rules      | Yes                              | No — there is no order yet                  |
| Embed Code Snippet (direct embed by survey ID)              | No — shows wherever you place it | No                                          |
| Thank You & Order Status, Order Status Only, Checkout Steps | Yes                              | Yes                                         |
| Shopify POS post-purchase screen                            | Yes                              | Yes                                         |
| Shopify POS smart grid tile                                 | No                               | No                                          |
| Email / SMS sent from an order trigger, abandoned checkout  | Yes                              | Yes (abandoned checkout has no order rules) |

#### How on-site surveys identify the shopper

On storefront pages Zigpoll knows who the shopper is only when they are **logged in to their Shopify customer account**. The Zigpoll app embed passes the logged-in customer to the survey, and Zigpoll reads their orders count, tags and total spent from Shopify.

{% hint style="warning" %}
**Customer rules on on-site surveys require the Zigpoll app embed.** Enable it in your theme editor under **App embeds** — see [Activating Zigpoll on Shopify](/installation/activating-zigpoll-on-shopify-2.0.md). Stores still using the legacy script tag or a manually pasted snippet cannot identify logged-in shoppers, so every visitor is treated as a new customer there.
{% endhint %}

A **logged-out visitor is treated as a new customer with no orders**. That means:

* A **New Customers** survey shows to logged-out visitors and to logged-in shoppers with fewer than two orders.
* A **Returning Customers** survey shows only to logged-in shoppers with two or more orders.
* A **Customer Tags — Includes** rule never matches a logged-out visitor; a **Does Not Include** rule always does.

This is the most accurate signal Shopify offers. For a logged-out visitor, Shopify itself has no record of past purchases. No app can tell a first-time buyer from a returning one who hasn't signed in. To target first-time or returning *visitors* by browser instead, use the **Visitors** rule above.

#### Combining Shopify rules with Targeting rules

Shopify Targeting Rules are applied **in addition to** the general Targeting settings on the same survey. The general settings and the Shopify rules must both pass. So you can layer them:

* **Visitors: first-time** + **New Customers** → first visit on this browser *and* not a logged-in returning customer.
* **Visitors: returning** + **Returning Customers** → a known repeat buyer on a browser that has been here before.
* **Page Views ≥ 3** + **Customer Tags includes VIP** → engaged VIPs only.

To show a different survey to each group, create one survey per segment, for example one with **New Customers** and one with **Returning Customers**. Zigpoll checks the customer rules before choosing which survey to show, so each shopper gets the one that matches them. This also applies to exit-intent surveys.

#### Basic Options

One-click presets: **All Customers**, **New Customers** only, **Returning Customers** only, **Contains Subscription** (order includes a subscription item), or **Does Not Contain Subscription**. The subscription presets are only offered where an order is available.

#### Advanced Rules

Click **Advanced Rules** to combine multiple conditions and control exactly when surveys are shown. Click **Add condition** to add a row, pick a rule, pick an operator, then enter the values. Available rules:

**Cart rules**

* **Product Ids** — which products were purchased
* **Variant Ids** — which product variants were purchased
* **Collection Ids** — whether purchased products belong to given collections
* **Product Tags** — tags on the purchased products
* **Product Type** — the type of the purchased products

**Order rules**

* **Order Total** — the order's total value
* **Discount Code** — a discount code entered on the order
* **Discount Application** — any applied discount by title (including automatic discounts)
* **Order Source** — where the order was placed, matched exactly against Shopify's source name (for example `web`, `pos`, or `subscription_contract` for subscription renewals). Type the value and press Enter.
* **Order Tags** — tags on the order *(not available for Checkout Steps surveys)*. See [Order tags and the Thank You page](#order-tags-and-the-thank-you-page) below.
* **Order Location Id** — the order's location, including fulfillment locations
* **Subscription Items** — whether the order contains a subscription (selling plan) item
* **Shipping Option** — the shipping method chosen, matched on its title or code (e.g. "Express Shipping") *(not available for Checkout Steps surveys)*
* **Payment Method** — the payment gateway used on the order, matched against Shopify's gateway name (e.g. `shopify_payments`, `paypal`, `gift_card`, or a manual method such as `Cash on Delivery (COD)`) *(not available for Checkout Steps or abandoned checkout surveys)*. Matching ignores capitalization, spaces and punctuation. A value matches whenever the gateway name contains it, so `cod`, `cash on delivery`, and `Cash on Delivery (COD)` all match the same orders. Wallets like Shop Pay, Apple Pay, and Google Pay all process through Shopify Payments and report as `shopify_payments`.
* **Shipping Country** — the country of the order's shipping address *(not available for Checkout Steps or abandoned checkout surveys)*. Orders without a shipping address (local pickup, digital goods) don't match "Is One Of" rules. For location targeting that isn't tied to the order's shipping address, use the general Country rule instead.
* **Shipping Region** — the state, province, or region of the order's shipping address *(not available for Checkout Steps or abandoned checkout surveys)*. Regions are listed with their country, since region codes repeat across countries. Adding a Shipping Country rule narrows the region list to those countries. Orders whose shipping address has no region don't match "Is One Of" rules. Regions are matched on their ISO 3166-2 code, the same standard Shopify uses for addresses. A small number of regions worldwide have no assigned code and aren't available for targeting.

**Customer rules**

* **Orders Count** — how many orders the customer has placed
* **Customer Tags** — tags applied to the customer
* **Customer Total Spent** — the customer's lifetime spend

Most list-based rules support **Includes Any / Includes All / Does Not Include Any / Does Not Include All** operators. Numeric rules support the full set of comparisons, such as equals, greater than and less than. Combine rules to build precise segments.

#### Entering products, variants and collections

**Product Ids**, **Variant Ids** and **Collection Ids** store Shopify's numeric IDs. You can fill them two ways:

* **Search by title.** Start typing the product or collection title and pick it from the list. For **Variant Ids**, type the *product* title; each variant is listed as `Product - Variant`. The rule shows the title next to the ID once saved.
* **Paste the ID.** Type or paste the number and press **Enter** to add it. You can find it in Shopify admin: open the product, variant or collection, and copy the number at the end of the page URL (for example `.../products/8123456789`).

{% hint style="warning" %}
**SKUs, handles and product names typed without picking them from the list are not accepted.** The rule compares the IDs on the order, so a SKU such as `LBXS` or a handle such as `blue-shirt` in these fields never matches and the survey won't show. Search by title, or use the numeric ID.
{% endhint %}

**Product Tags**, **Product Type**, **Customer Tags**, **Order Tags**, **Discount Code**, **Shipping Option** and **Payment Method** are free-text: type each value and press **Enter** (or click away) to add it. There is no lookup list. Tags and product types must match the **whole** value, though capitalization is ignored. A partial value such as `Muster` does not match a product type of `Muster (Klick-Vinyl)`.

#### How rules combine: AND and OR

Rules are read top to bottom as one list. The first row starts with **when**. Each row after it starts with **or** or **and**:

* Rows joined by **or** form a group. The group passes when **any one** of its rows passes.
* Choosing **and** on a row starts a second group. The survey shows only when **both groups** pass.

You can have at most two groups, so the full logic is *(any rule in group 1) AND (any rule in group 2)*.

Inside a single row, the operator decides how the values combine:

| Operator                 | Passes when                                                   |
| ------------------------ | ------------------------------------------------------------- |
| **Includes Any**         | at least one of the listed values is on the order or customer |
| **Includes All**         | every listed value is on the order or customer                |
| **Does Not Include Any** | none of the listed values are there                           |
| **Does Not Include All** | not every listed value is there (one or more is missing)      |

{% hint style="warning" %}
**Two exclusions joined by "or" don't both apply.** "Product Ids Does Not Include Any A **or** Customer Tags Does Not Include Any VIP" shows the survey whenever *either* is true. To require both, set the second row to **and**, or put both products in one **Does Not Include Any** row.
{% endhint %}

#### Example: exclude one product

To show a Thank You page survey for every order *except* orders containing one product:

1. Open the survey and go to **Settings → Targeting**.
2. Under **Shopify Targeting Rules**, click **Advanced Rules**.
3. Set the row to **when Product Ids → Does Not Include Any**, then search for the product and select it.
4. Click **Save Changes**.

To exclude several products, add them all to that same row. **Does Not Include Any** hides the survey if the order contains any of them.

To show a *different* survey for that product instead, create a second survey with **Product Ids → Includes Any → the product**, and place it above the catch-all survey in your Surveys list. Zigpoll checks surveys top-down and shows the first one whose rules match. See [Survey Order](/accounts/active-polls.md).

#### Order tags and the Thank You page

Shopify doesn't give checkout apps the order's tags or source on the **Thank You** page. Zigpoll sees them as empty there. An **Order Tags** or **Order Source** rule set to **Includes** never matches on that page, and one set to **Does Not Include** always does. On the **Order Status** page, and for order-triggered email and SMS, Zigpoll looks up the order itself, so tags that exist at that moment are read.

Tags added by **Shopify Flow** or another app are applied a moment after the order is created. A customer who reloads the Order Status page right away may not have them yet.

For surveys that must render as soon as the order is placed, target what is on the order at checkout instead: **Product Ids**, **Collection Ids**, **Product Tags**, **Product Type**, **Discount Code** or **Subscription Items**.

#### Keeping subscription renewals out of order surveys

Recurring subscription orders fire the same **Order paid**, **Order fulfilled** and **Order delivered** triggers as regular orders. There are two ways to keep them out:

* **Skip renewals only.** Add **Order Source → Excludes → `subscription_contract`**. Shopify gives renewal orders this source name, so the customer's first subscription order still gets the survey.
* **Skip every order with a subscription item.** Use the **Does Not Contain Subscription** basic option, or **Subscription Items → Does Not Contain Subscription**. This also skips the first order that started the subscription.

#### Shopify Markets

There is no **Market** rule. Shopify has deprecated its single-market API for apps, so target the dimension the market stands for:

* **Shipping Country** or **Shipping Region** (Advanced Rules) for Thank You, Order Status, email and SMS surveys.
* **Country** or **Region** (based on the visitor's IP address) for on-site surveys.
* **Language** for markets that differ by language, such as a French storefront.

{% content-ref url="/pages/ONZbTE8bnyvcrHwFaSly" %}
[Advanced Shopify Targeting](/tutorials/advanced-shopify-targeting.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.zigpoll.com/polls/targeting-settings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
