Skip to main content
Audience targeting lets you push studies to specific groups of users who have the Pillow SDK installed. Instead of sharing a link or manually triggering presentStudy(), you define a cohort and Pillow automatically presents the study when matching users open your app.

How it works

  1. You describe a cohort using a set of targeting rules — activity rules and property filters.
  2. You set a cooldown and an engaged conversations goal.
  3. Pillow locks in the audience of every user that matches at launch time.
  4. As users open your app, the SDK checks for a pending study and presents it.
  5. The run ends when the goal is reached, every eligible user has been presented, or you stop it manually.
Audience targeting only applies to users reached through the Pillow SDK. Users who open your study from a shared link or the embeddable website widget are not affected.

Prerequisites

Before you can launch an audience, you need:
  • A live alias on the study (promote the study to live from the Overview tab)
  • An app registered in Developer with at least one API key — see Apps and API keys
  • The Pillow SDK integrated in that app — see the Web, iOS, or Android guides
  • User identification via setExternalId() and, for property-based targeting, setUserProperty() — see Identification

Create an audience

1

Open the Integration tab

Go to your study’s Settings and open the Integration tab. Scroll to SDK distribution → Target audience.
2

Click Create audience

Click Create audience. If a previous run already exists, this button is labeled New audience.
3

Pick the app

Choose which app to target. All platforms (Web, iOS, Android) that share this app’s API key are included. Deactivated apps cannot be selected.
4

Add targeting rules

Build your cohort using activity rules and property filters (see Targeting rules below). The audience size at the bottom of the drawer updates automatically as you edit the rules.
5

Set the cooldown and goal

Set the Cooldown period (days to wait before the same user can be presented again) and the Engaged conversations goal (the run stops automatically when this many conversations are completed).
6

Launch

Click Launch. Pillow locks in the matching users and starts presenting the study on their next app open.
If a run is already active for this study, launching a new one prompts you to confirm. The active run is stopped and replaced by the new one.

Targeting rules

All rules are combined with AND — only users matching every rule are included in the audience.

Activity

Two sentence-style rules describe how recently a user has interacted with your app. Leave either blank to skip that rule.
  • User has been active in the last N days — filters users whose most recent session is within the window.
  • User has installed the app in the last N days — filters users whose first session is within the window.

Property filters

Click Add property filter to target users by a property. Each filter reads as a sentence: “has property X is Y. Properties you can filter on:
PropertySource
PlatformAuto-detected — iOS, Android, or Web
LocaleAuto-detected — e.g. en-US, fr-FR
App versionAuto-detected from your app build
CountryAuto-enriched from IP address
RegionAuto-enriched from IP address
CityAuto-enriched from IP address
Any custom propertyValues you set via setUserProperty() in the SDK
Custom properties only appear in the dropdown once your SDK has reported them for at least one user. If a property is missing, confirm the SDK is calling setUserProperty() in that app.
Operators:
OperatorApplies toBehavior
isAll propertiesExact match against a single value
is any ofAll propertiesMatch against any value in a list (multi-select)
is notCustom properties onlyExcludes rows with the given value
greater than, less than, greater or equal, less or equalCustom properties with numeric values onlyNumeric comparisons
Built-in properties (Platform, Locale, App version, Country, Region, City) only support is and is any of. Values: the value picker is a searchable dropdown backed by the values your SDK has actually reported. Start typing to filter the list, or press Enter to use a custom value you typed in.

Audience size

The drawer shows the live estimate at the bottom:
  • Audience size — how many users currently match all rules (after cooldown).
  • Will stop when reaching — the engaged conversations goal.
The estimate recomputes automatically as you change rules. If the audience is empty, Pillow shows a warning and disables Launch.
When you narrow the filters so that the audience drops below your engaged goal, Pillow automatically lowers the goal to match — it never asks for more conversations than there are eligible users.

Runs

Each launch creates a run. The active run (if any) sits at the top of Target audience, followed by up to five past runs. Click Details to expand the full rule breakdown. Each run card shows three metrics:
MetricWhat it means
AudienceUsers locked in at launch time
PresentedUsers who have been shown the study so far
EngagedUsers who completed a conversation, with progress toward the goal

Status

StatusDescription
BuildingPillow is still computing the audience
RunningThe study is being presented to users as they open the app
CompletedThe engaged goal was reached, or every eligible user has been presented
StoppedYou stopped the run manually
FailedThe audience could not be built — contact support
You can rename any run by clicking its title. Rename runs to keep track of experiments (e.g. “Power users — FR”, “Free tier — onboarding”).

Audience at launch

The audience is a fixed list of users who matched your rules at launch. New users that start matching later are not added to the current run — launch a new audience if you want to reach them.

Cooldown

The cooldown excludes any user who has already been presented with any Pillow study in the last N days. Use it to avoid fatiguing the same users across multiple studies.

Stopping a run

Click Stop on the active run to end it immediately. Users still in the audience won’t be presented anymore, but conversations already in progress continue.

SDK integration

Audience targeting requires one extra hook beyond the standard SDK setup so your app knows when it’s safe to present a study.

Web

The browser SDK checks for a pending launch study during its audience heartbeat. No extra code is needed beyond the standard initialization. To force a check (for example after a key user action), call:
await sdk.presentLaunchStudyIfAvailable();
See Web SDK — Launch studies.

iOS

Call onReadyToPresentStudy() from the view controller that should host the study (typically after your main UI is loaded).
PillowSDK.shared.onReadyToPresentStudy()
See iOS SDK — Launch studies.

Android

Call onReadyToPresentStudy() from your Activity’s onResume().
override fun onResume() {
    super.onResume()
    PillowSDK.onReadyToPresentStudy(activity = this)
}
See Android SDK — Launch studies.

What’s next?

Apps and API keys

Register an app and generate an API key.

Identification

Identify users and set properties used for targeting.

Web SDK studies

Present studies and handle launch studies on the web.

Broadcast your study

Other ways to distribute your study.