How to Set Targeting
Configure guide targeting within the Pyne dashboard under the “Targeting” section for each guide.
Choose Your Criteria
Select from various criteria types to define your target audience:
- The most commonly used setup for targeting is a combination of
- sign-up date (to e.g. only target new users)
- starting URL
- User Traits: Target based on properties sent via
pyne.identify(e.g.,role,plan,createdAt).
- You can combine multiple filters (e.g., user attributes, URLs, Selectors) to precisely define your target audience. The easiest way to target is by URL conditions (no integration required).
- Filters support various operators (equals, contains, greater than, before/after for dates, etc.).
- Date/Time properties use the ISO-8601 standard (e.g.,
2024-02-20T14:28:11Z) - here errors can happen, for instance when accidentially confunding DD and MM. - Confirm whether you’ve selected the correct attribute. If you select the wrong of the two CreatedAt vs. Created_At, it might cause lots of headaches
- If you’re using e.g. a “is one of” operator, just separate the entries with comata (e.g. 1,4,52,24) and without any spaces
Testing Targeting Rules
To verify your targeting rules work as expected:- Enable Targeting: Ensure the ‘Targeting’ toggle is enabled for the guide.
- Add Test Rule: Set up a specific rule that matches a test user account (e.g.,
email equals test@example.comorcompanyName equals YourTestCompany). - Save & Publish: Click Save, then Publish the guide (or Update Changes if already published). See Publishing Guides.
- Verify: Log in to your application as the test user who matches the criteria. The guide should automatically appear based on the targeting rules.
Advanced: targeting via client-side events
Overview
Guides can now be shown or hidden based on custom client-side events triggered during the session using the Pyne SDK. This allows you to control guide behavior based on real user actions—no backend integration needed.How to Emit an Event
Use the Pyne SDK method:- Events are client-only
- They exist only for the current session
- Not sent to pyne.ai servers
How to Target with Events
In the Guide Targeting UI, add a condition like:eventtriggeredcreate_project_clicked
company.createdAtis greater than2024-12-10Current URLends with/workspace