This article is also available in:
Conversion tracking codes are code snippets attached to the website to record information of customers buying on the website. You can optimize your ad campaigns on different channels by inserting the tracking code on the store's thank you page. There are many ways to install a tracking code on your thank you page. For the tracking code provided by a third party, it will be used as an additional script in your ShopBase admin page. In this article, we'll guide you on how to add conversion tracking code to your thank you page.

In this article

A. How to add tracking code to your thank-you page
B. Types of tracking codes

Note:

This is an advanced tutorial, if you are new to coding and resolving potential conflicts, please contact us via Live Chat for better support.

A. How to add tracking code to your thank-you page

From your store Admin Dashboard, go to Online Store >> Preferences

Scroll to the Additional scripts, paste this scripts in tab Head

<script>
window.sbsdk.ready(function() {
window.sbsdk.page.onContextUpdate(function(context) {
if (context.type === 'post_checkout') {
// Inject code tracking here
}
});
});
</script>



Replace the tracking scripts (provided by a third-party) in the // Inject code tracking here section
Click Save and you are done.

B. Types of tracking codes

Facebook Pixel tracking code

You can set up Facebook Pixel to track when customers visit your checkout and finish purchasing, check this guide for more details

Google Ads conversion tracking coded

Other than Facebook Pixel, you can use Google Analytics conversion tracking for customers' checkout process. More details, please refer to article on tracking Google Ads Conversion with ShopBase

Twitter tracking code

Kindly follow this article to know how to add the Twitter tracking code to your store
Was this article helpful?
Cancel
Thank you!