Consent review pop-up
Ask for consent before sending an invitation with WebwinkelKeur sidebar.
1. Insert sidebar script
<script>
(function(n,r){var e=document.createElement("script");e.async=!0,e.src=n+"/sidebar.js?id="+r+"&c="+c(10,r);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t);function c(s,i){var o=Date.now(),a=s*6e4,_=(Math.sin(i)||0)*a;return Math.floor((o+_)/a)}})("https://dashboard.webwinkelkeur.nl",<webshop's ID>);
</script>
For more information about the sidebar - Sidebar docs
2. Insert order data script
You will have to dynamically retrieve the orderNumber
, email
, firstName
and place them inside the script. Place the script on the order finish page
(Thank you page).
Example:
<script id="webwinkelkeur_order_completed">
{
"webshopId": 123, // required - can be found in WebwinkelKeur dashboard
"orderNumber": "order123", // required
"email": "customerEmail@example.com", // optional
"firstName": "Customer", // optional
"inviteDelay": 1 // optional - default value 5
}
</script>
The sidebar will detect the order data script and display the Consent review pop-up.