Targeting attributes
Tell the SDK about your user so placements can pick an audience, and handle the case where nothing is shown.
Placement audiences can test facts about the user, like plan or country. Your app passes those facts as attributes. They are compared on the device and are never sent to Miniwall. Miniwall stores only the rules.
An attribute is a string, a number or a boolean.
Passing attributes
| Where | Use |
|---|---|
configure (attributes) | Defaults for the whole app. |
setAttributes | Adds to or changes the saved attributes, for example after sign-in. null (nil on iOS) removes one. |
attributes option of a call | Merged over the saved ones for that call only. |
Miniwall.configure(apiKey: "pk_...", options: .init(attributes: ["plan": "free"]))
// after the user upgrades:
Miniwall.setAttributes(["plan": "pro", "country": "VN"])In the dashboard a condition on plan is Attribute from your site with the name plan. Names start with a letter and use letters, numbers and _, up to 40 characters. For something the SDK does not know, such as the operating system, pass your own attribute, for example platform set to ios or android.
Built-in facts
These need no attributes: locale (the call's locale, else the device's), device (mobile or tablet; a tablet is a screen at least 600 dp wide on Android and an iPad on iOS), seen_count and days_since_first_seen. The page-based fact path has no value in an app. See Audience for exact rules.
When nothing is shown
Targeting applies to placement sources. In order: the frequency limit, the first matching audience, the holdout. See Audience.
| Where | You get |
|---|---|
present | Finishes with skipped and a reason: frequency_cap, audience or holdout. Nothing opens. |
| Embedded screen | onFinish receives skipped. Nothing is drawn. |
| Auto placements | onResult receives the skipped result. |
A holdout skip records a holdout event. The other two send nothing.
Rules on the device
- Text comparisons ignore case. A missing,
nullor empty value fails every comparison except is not and is not set. - Number comparisons need numbers on both sides.
- The frequency counters and the first-run date are kept on the device (see Events and privacy). A per session limit counts screens shown since the app process started.
Related
Purchases and prices
Pass prices to the SDK by package ID, run your own purchase with StoreKit or Play Billing, and report purchases that finish elsewhere.
Events and privacy
What the SDK sends to Miniwall, what it never sends, what it stores on the device, how to answer the App Store and Google Play privacy questions, and how to turn analytics off.