Prompt
How do I create audience segments that update automatically from event data?
Latest observation
To create audience segments that update automatically from event data, you generally want to build dynamic audiences based on tracked user actions, then define rules that continuously re-evaluate as new events come in.
Basic approach
1. Define the events you want to use
Examples:
view_productadd_to_cartpurchasesign_upsubscription_cancelled
Make sure each event includes useful properties, such as:
- user ID / anonymous ID
- timestamp
- product/category
- revenue
- source/campaign
2. Send events consistently
Your app or website needs to send these events to your analytics/CDP/marketing platform in near real time or on a schedule. The audience can only update automatically if the platform receives fresh event data.
3. Create segment rules based on event behavior
Examples of dynamic rules:
- Users who did
add_to_cartin the last 7 days - Users who completed
purchaseat least 2 times in the last 30 days - Users who viewed
pricing_pagebut did notsign_up - Users who have not
logined in 14 days
4. Use inclusion and exclusion conditions
Common logic:
- Include users who performed an event
- Exclude users who performed a counter-event
- Add time windows and counts
Example segment:
- Include:
viewed_pricingat least once in the last 14 days - Exclude:
created_accountin the last 14 days
That gives you a “high-intent but not converted” audience.
5. Let the platform refresh membership automatically
Most platforms periodically recalculate audience membership as new event data arrives. The segment stays current without manual exports/imports.
Typical tools that support this
Depending on your stack, this feature is usually available in:
- CDPs: Segment, mParticle, Tealium, RudderStack
- Analytics: Amplitude, Mixpanel, Heap
- Marketing automation: Braze, Customer.io, Klaviyo, HubSpot
- Ad platforms: Meta, Google Ads, TikTok, LinkedIn via synced audiences
Example segment use cases
- Engaged users: opened app 5 times in the last 7 days
- Churn risk: active last month but no activity in the last 10 days
- Upsell target: purchased basic plan but not premium features
- Cart abandoners: added to cart but didn’t purchase within 24 hours
Best practices
- Use a stable user identifier so events map to the right person
- Make sure timestamps are accurate
- Be careful with anonymous vs known users
- Test your rules on a small sample before activating campaigns
- Keep event names and properties standardized
If you mean “how to implement this yourself”
You’d usually need:
- an event store,
- a user profile table,
- a rules engine to evaluate segment logic,
- a scheduled or streaming job to update memberships,
- an audience table/list synced to downstream tools.
If you want, I can show you:
- how to do this in Amplitude/Mixpanel/Braze, or
- how to build it yourself in SQL / Python / a data warehouse.