Perform actions after purchase

Execute custom JS after purchase

After a customer places an order, you can execute custom JavaScript code. It can be used for tracking purposes, requesting reviews, and more.

There are two ways to do this:

Redirect after purchase

Some merchants may want to send their customers after a successful online purchase to a custom URL. Using the configuration below can, set the URL where the customer should be redirected.

window.ec = window.ec || Object();
window.ec.config = window.ec.config || Object();
window.ec.config.custom_redirect_after_purchase = 'https://mycoolstore.com/thank-you.html';

📘

The redirect will work only for online payment methods. For offline payment methods, consider using the Custom URL for 'Thank you' page application.