We’re currently transitioning to the new Checkout Extensibility framework and would like to continue showing a customer survey (powered by Hotjar) on the order status/thank you page after checkout completion.
Previously, this was possible via the Additional Scripts section in the Shopify admin. However, with Additional Scripts being deprecated and the new checkout environment using sandboxed iframes, external scripts like Hotjar can no longer load or trigger surveys directly on the thank you page.
Could you kindly advise:
What are the recommended alternatives to load or trigger a third-party survey like Hotjar post-purchase using Checkout Extensibility?
Is it possible to pass a custom flag or event that can be picked up on the next page visit (e.g., homepage) to conditionally display a survey?
Does Shopify offer any native Web Pixel or analytics APIs that can be used for triggering client-side scripts securely outside of the checkout sandbox?
We’re looking for a solution that complies with the new Checkout Extensibility model but still allows for post-purchase customer feedback collection.
Hey @Muhammad_Luqman - thanks for reaching out! With Scripts being deprecated, you’re correct that it does make it a bit trickier to create post-purchase flows like surveys.
This would limit reusing Hotjar’s survey exactly as it is now I believe, since extensions “live” inside the sandboxed iframe environment, so the script couldn’t be injected, but you could theoretically rebuild a survey within the post purchase UI extension if you wanted to look at that as an option.
The post purchase UI extension framework is also still in an early access state, so any live shop does need to request access to the feature in order to enable it in production, and at the moment UI extensions are only available to Plus shops (just thought I would mention this even though you are already using a Plus feature with scripts)
For passing custom flags to trigger surveys on next page visits - the sandboxed extension doesn’t directly pass info like that over to my knowledge, but I’m curious about what you’re trying to set up there for sure! Are you looking to delay the survey or only show it to specific customer segments, etc?
Hope this helps and hope to speak soon as well, happy to help out with this