Targeting with Audience
This guide shows how to target users with Audience when using Storyly Placement SDK on React Native.
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 customParameter on StorylyPlacementConfig.
const placementConfig: StorylyPlacementConfig = {
token: "your-token",
customParameter: "your_custom_parameter",
}
const provider = useStorylyPlacementProvider(placementConfig, placementListener);
Warning
You are allowed to send a string value up to 200 characters with the
customParameterfield. 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.
Updated about 12 hours ago
