Embed SDK
The PollPe Embed SDK lets you add surveys to any website with a single script tag. It supports four display modes, hidden parameter passing, and completion callbacks.
<script src="https://embed.pollpe.com/sdk.js"></script>
<script>
PollPe.open('YOUR_SURVEY_ID', {
mode: 'popup',
params: {
email: '[email protected]',
orderId: 'ORD-123'
},
autoOpen: true,
onComplete: function(data) {
console.log('Survey completed', data.formId);
}
});
</script>
Display Modes
| Mode | Description | Best For |
|---|---|---|
popup | Centered modal overlay | Post-purchase surveys, feedback prompts |
panel | Slides in from the right | In-app feedback, support surveys |
fullscreen | Takes over the entire page | Focused survey experiences |
inline | Renders inside a container on your page | Embedded forms, landing pages, help articles |
Quick Start
- Create and publish a survey in your PollPe dashboard
- Add hidden fields if you want to pass context (e.g., email, user ID)
- Add the script tag and call
PollPe.open()on your page
See the Configuration page for all available options.
Platform Guides
Backward Compatibility
If you're using the older embed scripts (popup.js, side-panel.js, fullscreen.js), they still work. The same URLs now serve the unified SDK. Your existing code will continue to work without changes:
// These still work
window.openPollPeForm('FORM_ID');
window.openPollPeFormPanel('FORM_ID');
window.openPollPeFormFullscreen('FORM_ID');
To use the new features (params, auto-open, callbacks), switch to the PollPe.open() API.