Manual Trigger
Manual triggering allows you to bypass the SDK’s automatic targeting rules and show a specific survey when a user completes a specific action (e.g., clicking a button, completing a checkout, or encountering an error).
Automatic display timing, cooldowns, and repeat rules are covered in Behavior & Frequency. Surveys that require an identified user still need Identifying users before showSurvey can succeed.
The showSurvey Call
Section titled “The showSurvey Call”The showSurvey command takes a single argument: the unique surveyId.
window.pulseahead("showSurvey", "SURVEY_ID");| Parameter | Type | Description |
|---|---|---|
surveyId | string | Required. The unique identifier for the survey you want to show. |
How Manual Triggering Works
Section titled “How Manual Triggering Works”When showSurvey is called, the following rules are skipped:
- Initial wait — the minimum time since a user’s first visit is not enforced.
- Global cooldown — the project-level cooldown between surveys is not enforced.
The following rules are still enforced:
- Active status — the survey must be set to “Active” in the dashboard.
- Identified users only — if the survey requires an identified user, it will not show until
identifyhas been called. - Segment membership — if the survey targets a specific segment, the user must be in that segment.
- Repeat delay / show once — if the user has already completed the survey, the repeat delay (or “show once” setting) is respected.
- Dismiss / retry delay — if the user dismissed the survey, the retry delay is respected.
- Audience targeting — country, platform, OS, browser, URL patterns, and minimum session count are all still checked.
- Sampling — if the survey is configured with a sampling percentage below 100%, that is still applied.
Use Cases
Section titled “Use Cases”Post-Action Feedback
Section titled “Post-Action Feedback”Trigger a feedback survey immediately after a user performs a key action in your application:
// Example: Show a survey after a successful exportasync function handleExport() { await performExport(); window.pulseahead("showSurvey", "e76b29d4-...");}Targeted User Support
Section titled “Targeted User Support”Show a support survey if a user encounters an error or stays on a complex page for too long:
// Example: Show a survey if an error occurstry { await criticalOperation();} catch (error) { window.pulseahead("showSurvey", "error-feedback-id");}Custom Button Triggers
Section titled “Custom Button Triggers”If you have a persistent “Feedback” button in your UI, you can use showSurvey to open a specific survey when the button is clicked:
// React Example<button onClick={() => window.pulseahead("showSurvey", "global-feedback-id")}> Give Feedback</button>Finding the Survey ID
Section titled “Finding the Survey ID”You can find the unique ID for any survey in the URL of the Pulseahead survey editor. If you’ve set the survey to manual trigger in the Behavior tab, the exact showSurvey code snippet with the survey ID pre-filled is shown there too.
Related topics
Section titled “Related topics”- Ways to create a survey — editor, templates, and AI paths before you wire
showSurvey. - Script & Initialization — base snippet and
configif you have not loaded the SDK yet.