Skip to main content

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:

  1. Open your survey
  2. Go to Settings > Hidden Fields
  3. Add the fields you want to capture:
    • email -- customer's email
    • orderId -- order number
    • orderTotal -- order total

Step 2: Add the Snippet to Shopify

  1. Go to Shopify Admin > Settings > Checkout
  2. Scroll to Order status page > Additional scripts
  3. 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>
  1. Replace YOUR_SURVEY_ID with your survey ID from PollPe
  2. Click Save

Step 3: Test

  1. Place a test order on your store
  2. The survey popup should appear on the thank you page
  3. Check your PollPe dashboard for the response with hidden field values

Available Shopify Variables

You can pass any Shopify Liquid variable. Common ones:

VariableDescriptionExample
{{ customer.email }}Customer email[email protected]
{{ order.name }}Order number#1042
{{ total_price }}Order total49.99
{{ customer.first_name }}First nameJohn
{{ customer.last_name }}Last nameDoe
{{ order.financial_status }}Payment statuspaid
{{ order.item_count }}Item count3
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.