Tags
Tags let you segment content on the fly. When tags are set, the SDK only shows stories, In-App Messages and banners whose targeting matches the current tags — so you can tailor what a user sees without changing anything on the backend.
Setting tags at init
Pass tags in the config when you create the manager. They apply immediately to all content:
const storyManager = new StoryManager({
apiKey: 'YOUR_API_KEY',
tags: ['premium', 'en'],
});
Updating tags at runtime
setTags replaces the whole tag list:
storyManager.setTags(['premium', 'en']);
removeTags drops specific tags from the current list:
storyManager.removeTags(['en']);
Per-list tags
The StoriesWidget component accepts its own tags prop, so a single screen can show lists filtered differently:
<StoriesWidget feed="default" tags={['sale']}/>
tip
Call setTags before opening a reader or rendering a list — content is filtered by the tags active at load time.