Targeting, schedule and frequency cap
Choosing who sees an injectable and on which pages, when it is on, and how often one visitor sees it.
Three cards decide who sees an injectable and when. Which of them the form shows depends on the delivery route.
Targeting rules
A rule is a set of conditions. Conditions sit in groups, and a group is one of Match all (AND), Match any (OR) or Not (invert). Use Add condition and Add group to build it. An empty top-level group shows on every page the loader runs on; the form says so. An empty Match any group never matches and cannot be saved. There is a cap on how large the tree can grow.
Conditions
| Condition | What it checks |
|---|---|
| Page type | Home, category, product, cart, search or other. Checkout is listed but the loader never runs on checkout. |
| Category | The page or product belongs to categories you tick in a tree. |
| Product | The page is one of the products you tick. |
| Customer group | The shopper's BigCommerce customer group. |
| Segment | The shopper is in a customer segment. When segments are turned off for the store, this matches no one, and inside a Not it matches everyone. |
| Geo / country | The visitor's country, with optional regions such as California, Texas, and a switch Serve when the country is unknown. |
| Cart total | The cart subtotal is within a Minimum and Maximum in one Currency. No conversion between currencies. |
| Cart comparison | Cart total or Cart item count compared with a value: at least, greater than, equals, at most, less than or does not equal. The subtotal excludes tax and shipping. |
| Visitor type | New visitor, Returning visitor or Logged-in customer. |
| Schedule | A recurring window: Every day or chosen weekdays, with Start and End times and an optional Timezone (the store's by default). |
| Custom script | A piece of JavaScript that returns true or false. Carries the same warning as a Script injectable. |
| Traffic source | A UTM source, medium, campaign, term or content, or the referrer hostname, against a comma-separated list of values. First touch, case-insensitive. |
| Device / viewport | Mobile (under 768px), Tablet (768-1023px), Desktop (1024px and up), or a min and max width in pixels. |
| Day of week | Chosen weekdays with an optional timezone. |
| Purchase history | Order count, Total spent or Days since last order compared with a value. Uses synced orders, which can be up to an hour behind, and only for logged-in customers; anonymous visitors never match. Total spent is in whole units of the store currency. |
| Seen count | How many times this visitor has viewed this injectable, per browser, over its lifetime. Clearing browser storage resets it. |
Schedule
The Schedule card holds one window for the whole injectable: Window start and Window end, shown in the store's timezone. Clear a field to leave that side open. An end before the start is refused. This is different from the Schedule condition above, which repeats every week.
An injectable whose window has not opened shows as Scheduled; one whose window has closed shows as Expired. See Publishing and status.
Frequency cap
Turn on Limit how often visitors see this in the Frequency cap card. Fields:
| Field | Limit |
|---|---|
| Max impressions and Within (days) | Up to 200 views within 1 to 365 days. The two fields go together. |
| Cooldown after a view (hours) | Up to 720 hours, that is 30 days. |
| Snooze after a dismissal (days) | Up to 365 days. |
Caps are counted per browser, in the visitor's own browser storage, and are best effort: a cleared browser, a different browser, or Safari's seven-day storage limit resets them.
The dismissal snooze starts only when the visitor clicks an element inside your content that carries the attribute data-acme-dismiss, for example:
<button data-acme-dismiss>Close</button>A Script injectable has no markup to dismiss, so its snooze field is disabled.
Country visibility in mega menus
A mega menu can also show, hide or swap single menu items by country, on top of any rule on the injectable. See Content types.