Targeting an NPS Conditionally
Click on the Settings tab to customize where the NPS survey displays.
Just like any other Userpilot content, you can control where the content triggers and to whom it should trigger.
Environment
At the moment, the environment section allows you to trigger flows in your Production environment. The domains can be changed in their own section.
In the future, the option of Staging Then Production will be available. Keep an eye out for our updates!
Domain
To display the survey on a particular domain, select Specific domains. Use this option to include or exclude certain domains.
- All domains (Default): Displays the NPS anywhere the Userpilot script is installed
- Only on Specific domains: Displays the NPS if the domain exactly matches the input string
If you select a specific domain, you will need to click on the button Add Domain. There, you will see three different conditions you can select: Matches, Doesn't Match, and Matches Regex.
Use wildcards to match dynamic domains
In many cases, your domain might have dynamic parts that change from user to user. A common use of a wildcard domain is with applications that use a personalized subdomain for each user or account.
You can easily use the Asterix symbol as a wildcard (*) to replace the dynamic part. For example, to show the flow on ' campfire-test-name.userpilot.io' where the part 'name' is dynamic. You can set the domain to be the following:
Remember to click the button Apply or Add Domain once you have selected the domains you wish to use.
Page
You can also select the page, or pages, where the NPS will appear.
- Any page (Default): Displays the NPS on any location a user is in within your application.
- Only on a Specific page: Displays the NPS on a Page you are already tracking in Userpilot.
- Only on Specific Paths: Displays the flow on a particular page(s) within your application depending on the URL path.
What is a URL path?
URLs consist of the following parts:
https://staging.userpilot.com/dashboard/mailbox?Id=b3665070\___/ \_____/\____________/\________________/ \_________/ | | | | |Protocol Subdomain Domain Path Query
The Page settings should only include the path section of the URL.
Working with unique URLs
Some cases might involve showing flows on pages with dynamically changing URLs. To trigger the flow on the correct page, you can use 'Matches Regex' and use the Asterix symbol as a wildcard (*) to replace the part that is dynamic/changing (you can learn more about it here).
Audience
Based on user or company data and product usage data, you might want to target the NPS to a specific cohort of your users - e.g. you might want to target a flow based on the specific role.
All users (Default): Any identified user is eligible to see the NPS
Only me (useful for testing): All users who have access to your Userpilot account and have the chrome extension builder installed.
Saved segment: Use a previously created Segment that targets a specific group of users. This can be useful when you have a saved criterion that you want to use multiple times in several content.
Custom conditions: Define a subset of your users by using a set of rules to dictate which users are eligible to see the NPS. This includes user and company data that you are passing through your snippet, auto-properties that Userpilot automatically collects, events and actions that your users achieve in your app, and many more.
The targeting work is now done. The next step is to customize the NPS triggering.