# Storyly Targeting

This guide shows you how to show specific story groups using labels.

In the Storyly library, labels are called segments. If you have already set your labels for your story groups from the Storyly Dashboard, then you are ready to go. As it can be seen below, the Storyly library init method has a parameter called segments, which has the following definition:

    segments: ["your", "segments", "here"]

In the Storyly library, the segments parameter takes an arry of strings that will be used in the process of segmentation to show specific story groups to the users. If a label of the story group in the dashboard is a subset of your segments given to init method, Storyly library will show that story group. For basic targeting, it is enough to set the segments parameter.

# Example Usage:

  • If you do not give any parameters to segments, Storyly will show all active story groups with/without labels. This is the default behavior.
  • If you set ["car", "man"] to the segments, Storyly will show the story groups whose label set is "car", "man", car" and "man" and lastly, it will show the story groups without labels.
  • If you set an empty value to the segments, only the story groups without labels will be shown.