Targeting with Audience

This guide shows how to target users with Audience when using Storyly Placement SDK on Android.

📘

Before you begin

Make sure you have a working Placement integration (token, view, provider) as described in the Initial Setup.

Setup Audience in Storyly Dashboard

Audience enables you to target specific users by matching user information.

You need to setup your Audience in Storyly Dashboard, please follow Having Custom Audience for Widget Content

Passing Custom Parameter to SDK

This section shows you how to pass a custom parameter to the Storyly Placement SDK.

You need to send the same custom parameter to the Storyly Placement SDK as you uploaded in the dashboard. You need to use setCustomParameter on STRPlacementConfig.Builder.

placementDataProvider.config = STRPlacementConfig.Builder()
    .setCustomParameter(parameter = "your_custom_parameter")
    .build(token = "<your_placement_token>")

🚧

Warning

You are allowed to send a string value up to 200 characters with the customParameter field. If you exceed the size limit, your value will be set to null.

❗️

Attention

customParameter's value will be stored in Storyly's databases.

Audience Behavior

  • If you do not give any parameters to customParameter, Storyly Placement SDK will show all active content with/without audience. This is the default behavior.
  • INCLUDE: Storyly Placement SDK will show the content that match the audience.
  • EXCLUDE: Storyly Placement SDK will not show the content that match the audience.