What If My Website Doesn't Have a Confirmation Page or the Page Loads Dynamically?
If only part of your thank you page URL loads dynamically, please send us the static part of the URL. For example, if a customer ID loads dynamically at the end of the URL such as example.com/complete/customerid834957394673455, please send us example.com/complete/. We will be able to complete your integration using this.
If you don't have a confirmation page or your confirmation pages loads dynamically (eg: via AJAX), you will need to call the CartStack confirmation event. If you do not, CartStack won't know to stop the reminder email from being sent.
First, make sure that the CartStack global tracking code is included on your website. You can get your unique tracking code snippet on the code page of your account.
Then, you will need to call an event when a purchase happens on your website. In the below example, we will use a function called "confirmationEvent_CartStack()" to fire the event when the user clicks on the "submit order" button.
Here is the example HTML for the submit button:
<input type="submit" onclick="confirmationEvent_CartStack();" value="Submit Order" /><br>
Here is the example confirmation call event:
<script type="text/javascript"> function confirmationEvent_CartStack() { var _cartstack_update = []; _cartstack_update.push(['setSiteID', 'XXXXX']); _cartstack_update.push(['setAPI', 'confirmation']); cartstack_updatecart(_cartstack_update); } </script>