Cookbook

Targeting by Segment

Show different paywalls to different user groups

Targeting by Segment

Create segments to divide your audience, then use them to target different campaigns at different user groups. Show aggressive discounts to users whose trial expired while keeping full-price paywalls for new users.

Prerequisites:

  • A Nuxie account with an app and at least one published campaign
  • The iOS SDK installed and configured with user identity set up (see Quickstart)
  • Users with trackable properties or event history in your app

Step 1: Create a "Trial Expired" segment

Navigate to Segments in the dashboard sidebar. Click Create Segment and configure:

  • Name -- "Trial Expired"
  • Description -- Users whose free trial has ended without subscribing

Add a condition group:

  • Filter type -- Subscription
  • Operator -- is expired

This segment matches users whose subscription has lapsed. Nuxie evaluates segment membership automatically as user data updates.

Click Save. Nuxie compiles the conditions into an optimized rule set and begins evaluating users. The Customers tab shows matching users as evaluation completes.

Step 2: Create a "New Users" segment

Click Create Segment again:

  • Name -- "New Users"
  • Description -- Users who installed the app in the last 7 days

Add a condition group:

  • Filter type -- Event
  • Behavior -- Performed $app_installed in the last 7 days

This segment captures recent installs. As users age past the 7-day window, they automatically exit the segment.

Step 3: Build different paywalls

Create two flows in the Studio:

  • Discount paywall -- A paywall offering 50% off the first year, designed for trial-expired users who need a nudge to convert
  • Standard paywall -- Your full-price paywall with feature highlights, designed for new users seeing pricing for the first time

Publish each flow as a separate campaign.

Step 4: Configure segment-based targeting

Open the campaign for the discount paywall in the dashboard. Configure the trigger:

  • Trigger type -- Segment
  • Segment -- "Trial Expired"

When a user enters the "Trial Expired" segment, this campaign becomes eligible. Combine it with an event trigger if you want the paywall to appear at a specific moment (e.g., when the user taps a locked feature).

For the standard paywall campaign, configure:

  • Trigger type -- Segment
  • Segment -- "New Users"

Now each audience sees a different paywall tailored to their stage in the user lifecycle.

Step 5: Combine conditions with AND/OR logic

For more precise targeting, use the segment builder's group logic. For example, create a "High-value churning" segment:

  • Group A -- Subscription is expired
  • Group B -- Event: performed purchase where amount > 50 in the last 90 days

Set the outer logic to AND. This segment matches users who churned but previously spent more than $50 -- prime candidates for a personalized win-back offer.

You can also reference other segments as conditions:

  • Filter type -- Segment membership
  • Operator -- Is in "Trial Expired"

This lets you compose complex audiences from simpler building blocks. Nuxie tracks dependencies between segments and evaluates them in the correct order.

Warning: Circular references are not allowed. If Segment A references Segment B, then Segment B cannot reference Segment A. The builder prevents you from selecting segments that would create a cycle.

Step 6: Test targeting with the SDK

Verify your segments work by setting user properties that match your segment conditions:

swift
NuxieSDK.shared.identify("test_user_123", userProperties: [
    "plan": "expired",
    "signup_date": "2026-01-01"
])

Then trigger the event your campaigns respond to:

swift
NuxieSDK.shared.trigger("feature_locked")

The SDK evaluates segment membership locally and presents the matching campaign's version. Use the TriggerHandle to confirm which campaign matched:

swift
NuxieSDK.shared.trigger("feature_locked") { update in
    switch update {
    case .decision(.flowShown(let ref)):
        print("Flow presented: \(ref)")
    case .decision(.noMatch):
        print("No campaign matched")
    default:
        break
    }
}

Step 7: Monitor per-segment performance

Open each campaign's detail page to compare performance across audiences:

  • Impressions -- How many users in the segment saw the paywall
  • Conversions -- How many completed the campaign goal
  • Conversion rate -- Conversions divided by impressions

Compare the discount paywall's conversion rate against the standard paywall to understand whether the discount offer is effective for churning users.

Use the analytics dashboard to view aggregate metrics across all campaigns. Filter by date range (7 days, 30 days, 90 days) to track trends over time.

Next steps