Skip to content

Exclusive segmentation rather than inclusive #42

@joerstom

Description

@joerstom

When utilizing segmentation, a widget will display all of the posts that meet the segmentation criteria PLUS any posts that have no segmentation set at all but may meet other criteria.

Example:

  • Post 1
    • Label: "A"
    • Segmentation: null
  • Post 2
    • Label: "B"
    • Segmentation: "segmentName" = "C"
  • Post 3:
    • Label: "A"
    • Segmentation: "segmentName" = "C"

Widget Code:
<AnnounceKit embedWidget labels={['A']} widget="..." data={{ segmentName: 'C' }} />

Desired behavior - I would like for this widget to show ONLY posts that are both Label = "A" and segmented for "segmentName" = "C".

Right now, this widget would display both Posts 1 and 3, but not 2. And I would like the widget to show only Post 3.

It seems like a boolean prop at the top level, or segment prop, to toggle inclusive versus exclusive post query would be sufficient.

Something like data={{ segmentName: {require = true, value = 'C'} }} or just a boolean for the widget itself that is something like limitBySegmentationData that would produce an error if data is not provided/valid.

Maybe I'm missing a way to do this? If I segment by "widget", the same behavior described at the beginning is true. It includes all UNSEGMENTED posts as well as the posts with segmentation assigned to that widget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions