> 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

You can use targeting settings in order to take better control over 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

This will control what percentage of visitors see your survey. For example, if you select 50%, then 1 out of every two visitors will be shown your survey. This behavior will occur randomly.

#### Referral

This will control who sees your survey. For example, if you select, "Traffic to your site from a search engine" then your survey will only be shown to users who found you through Google, Yahoo, Bing, etc...

There are options to only show surveys to visitors coming from paid traffic (has an ad engine UTM), specific referring sources, or organic traffic sources.

#### Country

This will allow you to only show your survey to users from a certain country or countries. This is useful if you want to target your domestic or international customers. Location is determined from the visitor's IP address.

#### Region

Narrow 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 is based on the visitor's IP address; if a region cannot be determined the rule is skipped rather than blocking the survey.

#### Browser

This will allow you to survey customers who are using a specific browser (Chrome, Safari, Firefox, Internet Explorer, or Edge). This is useful for debugging your user experience on a particular browser.

#### Device Type

This will allow you to survey customers based on the device they're visiting from — mobile, tablet, or desktop. This is useful when an experience or a question only applies to a particular form factor.

#### Language

This will only show surveys to customers with matching languages. Matches are based on the language of the visitor's browser. Important if you only want to survey a specific set of customers (French speakers).

If you need to translate your survey, Zigpoll can do that! Please review:

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

#### IP Address

This allows you to restrict your survey to (or hide it from) a specific set of IP addresses. CIDR notation (for example `203.0.113.0/24`) is supported when you need to cover a whole range — useful for excluding your own office or agency from results.

#### Hostnames

Only show a survey on certain domains, or everywhere except certain domains. The rule matches the hostname the survey is being served from (for example `shop.example.com` versus `staging.example.com`), which lets one account serve different surveys to production and staging, or to several storefronts.

#### Metadata

Show 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 comes from what your site passes to Zigpoll (see the JavaScript API), plus the 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

This allows you to show the survey to first-time visitors only, or to returning visitors only. Zigpoll counts sessions in the visitor's browser storage, so this is a per-browser signal: 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`) is treated as returning on their first visit, since they already know your brand. For targeting by *purchase history* on Shopify, use the Customer rules below instead.

#### Page Views

This allows you to only show a survey after a user has visited a certain number of pages. This is useful if you only want to bother your customer with a survey after they have had some time to enjoy 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 (see [Stripe](/integrations/stripe.md) and [Square](/integrations/square.md)) get their own rule section, so you can show a survey only for payments that match an amount, currency, metadata value, or specific product/price IDs (Stripe) or item IDs (Square).

### Shopify Targeting Rules

For brands on Shopify, Zigpoll can be configured to only display to certain groups of customers. These settings appear automatically for every on-site survey on a Shopify store, and for surveys configured for a Shopify-specific delivery method (Thank You & Order Status, Order Status Only, Checkout Steps, email/SMS triggers, etc.).

#### 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 — renders 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, so no app can tell a first-time buyer from a returning one who hasn't signed in. Use the **Visitors** rule (below) when you want browser-based first-time vs returning *visitor* targeting instead.

#### Combining Shopify rules with Targeting rules

Shopify Targeting Rules are applied **in addition to** the general Targeting settings on the same survey — every rule must 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 evaluates the customer rules before choosing which survey to display, 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** to set and combine multiple conditions to control exactly when surveys are shown. 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 (web, POS, etc.)
* **Order Tags** — tags on the order *(not available for Checkout Steps surveys)*
* **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 is case-insensitive, ignores spaces and punctuation, and a value matches whenever the gateway name contains it — so `cod`, `cash on delivery`, and `Cash on Delivery (COD)` all match the same orders. Note: 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, and numeric rules support the full set of comparisons (equals, greater than, less than, etc.), so you can combine rules into precise segments.

{% 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.
