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_parameter to 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

Provide a string during initialization:

const config = {
  token: "<your_placement_token>",
  customParameter: "<csv_row_identifier>",
};

await storylyPlacement.init(config);

Pass customParameter via URL

Append customParameter at the end of the URL:

...&customParameter=<csv_row_identifier>&...

🚧

Warning

URL parameters are applied only when userProperties is not provided in init().
If you pass userProperties in init(config), make sure you also pass customParameter there (or provide both values via URL + no userProperties config).