Targeting with Audience
This guide shows how to target users with Audience feature and use personalization features when using Storyly Placement SDK on Android.
Targeting
This section explains how to:
- Target a user using a CSV audience (via
customParameter) - Pass a custom parameter through code or URL (via
customParameter)
CSV audience (what to pass from your app)
If you configured a CSV audience in the Storyly Dashboard and use it for targeting in a placement, you need to pass the same identifier value from your CSV row into the Web SDK.
In this SDK, that identifier is provided via customParameter.
const config = {
token: "<your_placement_token>",
customParameter: "<csv_row_identifier>",
};
Placement note
The SDK sends
custom_parameterto Storyly so the server can decide which widget/experience to return.
User properties are used client-side to fill user property placeholders in story content.
Include/Exclude
The include/exclude selection for your CSV audience is configured in the Storyly Dashboard. The SDK only provides the identifier (
customParameter).
Custom Parameter
Pass customParameter via SDK config
customParameter via SDK configProvide a string during initialization:
const config = {
token: "<your_placement_token>",
customParameter: "<csv_row_identifier>",
};
await storylyPlacement.init(config);
Pass customParameter via URL
customParameter via URLAppend customParameter at the end of the URL:
...&customParameter=<csv_row_identifier>&...
Warning
URL parameters are applied only when
userPropertiesis not provided ininit().
If you passuserPropertiesininit(config), make sure you also passcustomParameterthere (or provide both values via URL + nouserPropertiesconfig).
Updated about 19 hours ago
