Segments

Using Segments

Target campaigns, experiments, and features with segments

Using Segments

Once defined, segments can be referenced anywhere that needs audience targeting: campaign triggers, experiment populations, and feature gates.

Campaign triggers

Use a segment as a campaign trigger to show a flow only to users who match specific criteria. In the Studio, set the starting point trigger type to Segment and select the segment you want to target.

When a campaign uses a segment trigger, Nuxie checks the user's segment membership as part of the profile response. If the user is a member, the campaign is eligible to present.

For example, a "Free Users" segment trigger ensures your upgrade paywall appears only to users who have not yet subscribed. See Triggers & Goals for more on configuring triggers.

Experiment scoping

Combine segments with experiments to run A/B tests on a specific audience. Set a segment trigger on your campaign, then add an experiment action inside the flow. Only users who match the segment see the experiment.

This lets you test a paywall redesign on free users without affecting subscribers, or run an onboarding experiment only for new users. See Experiments for details.

Segment dependencies

Segments can reference other segments. When Segment A includes a "is in Segment B" condition, Nuxie tracks this as a dependency. Dependencies affect two things:

  • Evaluation order -- Nuxie evaluates Segment B before Segment A so that the membership check uses fresh results.
  • Delivery -- When a campaign references Segment A, Nuxie automatically includes Segment B in the profile payload so the SDK has everything it needs for on-device evaluation.

Dependencies can be chained (A depends on B, B depends on C), but circular references are not allowed. The builder and the server both enforce this constraint.

Viewing dependencies

Open a segment's detail view in the dashboard. The Usage tab shows which campaigns reference the segment. The segment detail sidebar shows which other segments depend on this segment (dependents) and which segments it references (dependencies).

If you try to archive a segment that other segments depend on, Nuxie prevents the operation and tells you which segments would be affected.

SDK profile

Segments are delivered to the SDK as part of the user profile. The profile includes:

  • Segment definitions -- The compiled rules for each segment referenced by a running campaign (plus any dependencies).
  • User properties -- Only the properties needed to evaluate the included segments, keeping the payload minimal.

The SDK uses these definitions to evaluate segment membership on-device for instant results. Server-side evaluation handles conditions that require event history or other data not available locally.

Checking membership in Swift

Use the Nuxie SDK to check whether the current user belongs to a segment:

swift
// Check if the user is in a segment
let isFreeUser = Nuxie.isInSegment("free_users")

Segment membership reflects the most recent profile data. Call Nuxie.refresh() to fetch the latest profile if you need an immediate update.

Viewing members and counts

From the segment detail view in the dashboard:

  • Customers tab -- Browse users currently in the segment with their entry date.
  • Member count -- Displayed on the segment list and detail header.

Member counts reflect server-side evaluation results and update as events are processed.

Next steps