Targeting rules decide which visitors can see a campaign's popups, based on who they are, which pages they're on, and where they came from. This reference lists every condition you can add to a campaign's targeting rules, grouped the way they appear in Alia, with links to the articles that show you how to use them.
How targeting rules work
A campaign's targeting rules are a list of conditions joined by AND or OR. With AND, a visitor must match every condition. With OR, they must match at least one. To switch, select the icon next to AND or OR.
Every new campaign starts with one condition: In targeting rule or campaign: New visitors. To show a campaign to everyone, including returning visitors and subscribers, remove that condition.
Targeting rules decide who can see a campaign. Triggers, set on each popup in the popup editor, decide when the popup opens. A popup opens only when a visitor matches the campaign's targeting rules and one of the popup's triggers fires. To change when a popup opens, see How to set or adjust the time delay for your popup.
💡Note: A campaign with no conditions shows to every visitor under AND and to no one under OR.
Edit a campaign's targeting rules
In Alia, go to Campaigns.
On the campaign's card, select Targeting.
In Edit targeting, select Select a filter and choose a condition.
Select Save.
Save stays grayed out until you change something.
💡Tip: Lia can explain who a campaign shows to and change its targeting rules for you. In Edit targeting, describe the audience you want, such as "only mobile visitors from the US." See How to set up targeting with Lia.
Saved targeting rules
A saved targeting rule is a set of conditions you can reuse in any campaign. Find them in Campaigns → Targeting rules, and select Create rule to add one. Changes on this page save automatically and apply to every campaign that uses the rule. Each rule shows where it's used, such as "Used in 2 campaigns and 1 targeting rule."
Every store has 2 built-in saved rules. You can edit them, but not delete them.
New visitors matches anyone who isn't a returning visitor and has never signed up for email or SMS through Alia.
Returning visitors matches anyone who signed up for email or SMS through Alia in an earlier session, is recognized by a marketing tool's cookie, arrived from an email or SMS link (a UTM source or medium of klaviyo, email, sms, or text), or has visited an
/accountor/thank_youpage.
If you send email or SMS from a tool other than Klaviyo, add its UTM sources and mediums to the Returning visitors rule so its subscribers are recognized. See How to prevent popups from showing to existing subscribers.
Conditions you can add
In Edit targeting, select Select a filter to see these groups. Most conditions come in pairs, such as Is on page(s) and Is not on page(s).
Targeting rule or campaign conditions
Condition | What it matches | Learn more |
In targeting rule or campaign, Not in targeting rule or campaign | Visitors who match, or don't match, a saved targeting rule or another campaign's targeting. Use the campaign option to keep 2 campaigns from showing to the same visitors. |
Page conditions
Condition | What it matches | Learn more |
Is on page(s), Is not on page(s) | The page the visitor is on now. | |
Has visited page(s), Has not visited page(s) | Any page in the visitor's recent browsing history on your store, across visits. |
|
Number of pages viewed | How many pages the visitor has viewed in this session. |
|
Number of sessions | How many sessions the visitor has had on your store. Each browser tab is a session. |
|
Page conditions match By path only (such as /products/123) or By full URL, with Exact match or Contains. With Exact match, use * as a wildcard. Paths are case sensitive, so Contains is usually the safer choice.
Cookie conditions
Condition | What it matches | Learn more |
Identified by any cookie, Not identified by any cookie | Whether a marketing tool on your store already recognizes the visitor. You choose which tools count: Klaviyo, SMSBump, Unveild, Upstack, Tie, Dotdigital, and Postscript. |
Traffic source conditions
Condition | What it matches | Learn more |
UTM source is, UTM source is not, UTM medium is, UTM medium is not | The most recent |
User conditions
Condition | What it matches | Learn more |
Device type | Mobile or desktop. A screen narrower than 1,024 pixels counts as mobile, so most tablets held upright count as mobile. |
|
Operating system is, Operating system is not | iOS, Android, Windows, macOS, Linux, Ubuntu, Chrome OS, or Unknown. |
|
Has completed action, Has not completed action | An action the visitor has taken: Viewed popup, Closed popup, Email sign up, SMS sign up, Email opt in, SMS opt in, Answered miniquiz, Claimed reward, or Attributed order. Choose whether it counts In a previous session, In this session, or In this session or a previous session. Use Add filter to narrow it by Occurred, In campaigns, or Not in campaigns. |
|
First visited | When Alia first saw the visitor, more or less than a set time ago. |
|
Property is, Property is not | A value saved on the visitor, such as a quiz answer. [Not set] matches visitors without the property. |
|
Location conditions
Condition | What it matches | Learn more |
In countries, Not in countries, In continents, Not in continents, In states/regions, Not in states/regions, In cities, Not in cities | Where the visitor is, based on their IP address. There's no ZIP code or radius targeting. |
|
Shopify conditions
Shopify conditions are available on Shopify stores.
Condition | What it matches | Learn more |
In markets, Not in markets | The visitor's Shopify Market. |
|
In locales, Not in locales | The storefront language the visitor is using. |
|
In countries, Not in countries | The country Shopify has set for the visitor, which can differ from their IP location. |
|
Number of orders | The visitor's past Shopify orders. This is only known for visitors Alia has identified, and counts as 0 for everyone else. |
|
Cookie consent allowed | Whether the visitor allowed Marketing, Sale of data, Analytics, or Preferences in Shopify's customer privacy banner. |
|
Klaviyo conditions
Klaviyo cookie conditions need Klaviyo's tracking script on your store. Klaviyo list and segment conditions need the Klaviyo integration, and Klaviyo can only answer for visitors it already recognizes in that browser. Everyone else gets the condition's default, such as Default to not in list.
Condition | What it matches | Learn more |
Identified by Klaviyo cookie, Not identified by Klaviyo cookie | Whether Klaviyo already recognizes the visitor. |
|
In Klaviyo list, Not in Klaviyo list | Whether the visitor is on one of your Klaviyo lists. | |
In Klaviyo segment, Not in Klaviyo segment | Whether the visitor is in one of your Klaviyo segments. |
Dotdigital conditions
Condition | What it matches | Learn more |
In Dotdigital list, Not in Dotdigital list | Whether the visitor is on one of your Dotdigital lists. Needs the Dotdigital integration. |
Custom code condition
Condition | What it matches | Learn more |
Custom code | Your own JavaScript decides whether the visitor matches. Return |
Common targeting setups
I want to... | Use these targeting rules |
Show a signup popup only to people who haven't subscribed | Keep In targeting rule or campaign: New visitors. To also hide it from people who subscribed outside Alia, add Not in Klaviyo list. See How to prevent popups from showing to existing subscribers. |
Show a campaign to new and returning visitors | Remove In targeting rule or campaign: New visitors. With AND and no other conditions, every visitor matches. |
Keep 2 campaigns from showing to the same visitors | In one campaign, add Not in targeting rule or campaign and choose the other campaign. |
Run a second signup campaign, such as an early-access list, for visitors who haven't signed up through your main popup | Add Has not completed action → Email sign up, then Add filter → In campaigns and choose your main campaign. |
Show a popup only to past customers | Add Number of orders, choose Is greater than or equal to, and enter 1. It only counts visitors Alia has identified. |
Show a popup only to visitors from one traffic source | Add UTM source is or UTM medium is. See Target popups by traffic source (UTM). |
Keep a popup off certain pages | Add Is not on page(s), or put the pages in a saved targeting rule you reuse. See Hide popups on certain pages. |
💡Tip: To send a second campaign's signups to their own Klaviyo list, open its popup in the popup editor and go to Integration settings → Klaviyo settings. In Klaviyo, filter flows by the alia_campaign property to treat signups from each campaign differently. See Using Alia profile properties in Klaviyo flows and emails.
Targeting rules FAQ
How do I know if my targeting rules conflict?
Alia warns you in Edit targeting when a rule can't work: Circular logic when 2 saved rules refer to each other, and a warning when a condition makes the rule match all visitors or no visitors. Also look for conditions that cancel each other out.
For example, with AND, New visitors and Returning visitors together match no one. To check who sees your popup, see How to preview and test your Alia popups. If it isn't showing at all, see My popup isn't showing on my store.
What happens if someone who's already subscribed signs up again?
Alia sends the signup to your connected email platform as usual. In Klaviyo, Alia updates the subscriber's existing profile instead of creating a second one. In Alia's analytics, the signup counts as an email submission, so use opt-ins to measure list growth.
To show already-subscribed visitors a different step, use the form's Klaviyo user → Email already subscribed branch. See How to prevent popups from showing to existing subscribers.
Still have questions?
Start a chat from inside the Alia app, or use the chat in our Help Center.
