Presenting a specific survey
For instances where you would like to bypass the targeting engine and control when a survey is displayed, such as when a user clicks a "give feedback" link, you can use the Present method.
pi('present', '1234'); // Where 1234 is the ID of the survey you'd like to present
You can find the ID of a survey in Console. If you are a developer that doesn't have access to Console, you can ask your Client Success Manager to help you.
A Present Alias enables you to use a name instead of a Survey ID. This gives you the flexibility to change the survey that will trigger in Console, without having to update your code to swap the Survey ID.
pi('present', 'alias');
For example
pi('present', 'feedback_form_us-en');
For cases, where you're linking to a page and want the page to trigger a specific survey on page load, you can append the following query string into the URL:
By Survey ID:
https://url.com/?pi_present=1234 //where 1234 is the ID of the survey
By Present Alias:
https://url.com/?pi_present=feedback_form_us-en
Case | Comment |
---|---|
Feedback tabs or footer links | |
Redirect links from email surveys that should display a Thank You message or follow-up survey | Use the query string parameter ?pi_present for this use case |
Button clicks that should trigger a survey | You can also listen for button clicks without using the present method using Console targeting. |
For events that are visible to the back-end but not to the client | |
Last modified 4mo ago