Shopify Post-Purchase Survey
Add a PollPe survey popup to your Shopify order confirmation (thank you) page. When a customer completes an order, they see a survey with their order details pre-filled.
Setup
Step 1: Configure Hidden Fields
In your PollPe dashboard:
- Open your survey
- Go to Settings > Hidden Fields
- Add the fields you want to capture:
email-- customer's emailorderId-- order numberorderTotal-- order total
Step 2: Add the Snippet to Shopify
- Go to Shopify Admin > Settings > Checkout
- Scroll to Order status page > Additional scripts
- Paste:
<script src="https://embed.pollpe.com/sdk.js"></script>
<script>
PollPe.open('YOUR_SURVEY_ID', {
mode: 'popup',
params: {
email: '{{ customer.email }}',
orderId: '{{ order.name }}',
orderTotal: '{{ total_price }}'
},
autoOpen: true,
onComplete: function() {
// Survey completed
}
});
</script>
- Replace
YOUR_SURVEY_IDwith your survey ID from PollPe - Click Save
Step 3: Test
- Place a test order on your store
- The survey popup should appear on the thank you page
- Check your PollPe dashboard for the response with hidden field values
Available Shopify Variables
You can pass any Shopify Liquid variable. Common ones:
| Variable | Description | Example |
|---|---|---|
{{ customer.email }} | Customer email | [email protected] |
{{ order.name }} | Order number | #1042 |
{{ total_price }} | Order total | 49.99 |
{{ customer.first_name }} | First name | John |
{{ customer.last_name }} | Last name | Doe |
{{ order.financial_status }} | Payment status | paid |
{{ order.item_count }} | Item count | 3 |
note
Each variable you use must have a matching hidden field with the exact same name in your PollPe survey settings.
Button-Triggered Alternative
If you prefer not to auto-open the survey, remove autoOpen: true and add a button:
<script src="https://embed.pollpe.com/sdk.js"></script>
<button onclick="PollPe.open('YOUR_SURVEY_ID', {
mode: 'popup',
params: { email: '{{ customer.email }}', orderId: '{{ order.name }}' }
})">
Share Your Feedback
</button>
Troubleshooting
Survey doesn't appear
- Check that your survey is published in PollPe
- Verify the survey ID is correct
- Open browser DevTools (F12) > Console for errors
Hidden fields are empty
- Param names must exactly match the hidden field names in PollPe
- Shopify variable names are case-sensitive
Survey shows "Question Not Found"
- The survey may be expired or unpublished
- Check the survey status in your PollPe dashboard
Shopify Plan Compatibility
The "Additional Scripts" section on the Order Status page works on all Shopify plans (Basic, Shopify, Advanced, Plus). The Liquid variables listed above are available on all plans.