presentStudy(), you define a cohort and Pillow automatically presents the study when matching users open your app.
How it works
- You describe a cohort using a set of targeting rules — activity rules and property filters.
- You set a cooldown and an engaged conversations goal.
- Pillow locks in the audience of every user that matches at launch time.
- As users open your app, the SDK checks for a pending study and presents it.
- 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
Open the Integration tab
Go to your study’s Settings and open the Integration tab. Scroll to SDK distribution → Target audience.
Click Create audience
Click Create audience. If a previous run already exists, this button is labeled New audience.
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.
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.
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).
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:| Property | Source |
|---|---|
| Platform | Auto-detected — iOS, Android, or Web |
| Locale | Auto-detected — e.g. en-US, fr-FR |
| App version | Auto-detected from your app build |
| Country | Auto-enriched from IP address |
| Region | Auto-enriched from IP address |
| City | Auto-enriched from IP address |
| Any custom property | Values 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.| Operator | Applies to | Behavior |
|---|---|---|
is | All properties | Exact match against a single value |
is any of | All properties | Match against any value in a list (multi-select) |
is not | Custom properties only | Excludes rows with the given value |
greater than, less than, greater or equal, less or equal | Custom properties with numeric values only | Numeric comparisons |
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.
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:| Metric | What it means |
|---|---|
| Audience | Users locked in at launch time |
| Presented | Users who have been shown the study so far |
| Engaged | Users who completed a conversation, with progress toward the goal |
Status
| Status | Description |
|---|---|
| Building | Pillow is still computing the audience |
| Running | The study is being presented to users as they open the app |
| Completed | The engaged goal was reached, or every eligible user has been presented |
| Stopped | You stopped the run manually |
| Failed | The audience could not be built — contact support |
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:iOS
CallonReadyToPresentStudy() from the view controller that should host the study (typically after your main UI is loaded).
Android
CallonReadyToPresentStudy() from your Activity’s onResume().
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.