The custom checkout scripts feature was designed to let you use analytics tracking systems like Google Analytics, Facebook Pixel, and others on the checkout of your online store.
Available only for our premium accounts, analytics tracking help you create sales funnels and keep track of even more stats to make your business more successful.
How it works
You can also use custom checkout scripts to slightly modify the behavior of your checkout.
For example, you can add a support chat or replace the logo. This is not the original intended use of this feature, so as Booqable gets updated, you may need to edit your code again.
💡Note: Any script you would enter into this field must be written in Javascript. Please only use features that are commonly supported in browsers, or the checkout might break for your customer.
1. Where code can be added within Booqable
Checkout Scripts are also known as Additional Scripts in settings.
They can be found by following the instructions below.
Open your Settings in Booqable.
Click on the Online checkout option in the left menu.
Click on Additional Scripts in the left menu, this will take you to the bottom of the Online checkout options.
2. How to track your analytics
We have built-in some common features for both Google Analytics and Facebook Pixel, that with a simple code, you can do some basic page tracking and event tracking.
Both analytics types can have event tracking by just placing the proper code into Booqable. Conversion tracking would need to be built within your analytics account based on the events that are sent over from Booqable.
1. Facebook Pixel
The code below sets up Facebook Pixel using your Facebook Pixel ID from your Facebook Pixel account. This ID should be placed within the single quotation marks in place of the words tracking-id
.
Booqable.setupFacebook('tracking-id', true);
With the default events, which this code includes, tracking for the InitiateCheckout, AddPaymentInfo & Purchase events will occur automatically once added.
If you do not want event tracking to be sent into Facebook Pixel you can put false
in place of the word true
at the end of the code before the end bracket.
2. Google Analytics
The code below sets up Google Analytics with your Google Analytics tracking ID, which should be placed within the single quotation marks in place of the words tracking-id
.
After this code, you can use gtag(), if needed.
Booqable.setupGoogleAnalytics('tracking-id');
This code will provide page tracking only, this is the default state.
There are multiple options for how to set up google analytics tracking either with or without event tracking and with or without page tracking. These are the available options:
For No Event and No Page Tracking:
Booqable.setupGoogleAnalytics('tracking-id', false, false);
For Only Page Tracking (page views) and No Event Tracking:
Booqable.setupGoogleAnalytics('tracking-id', true, false);
For Only Event Tracking and No Page Tracking:
Booqable.setupGoogleAnalytics('tracking-id', false, true);
For Both Event Tracking and Page Tracking:
Booqable.setupGoogleAnalytics('tracking-id', true, true);
💡Are you a developer? Do you want more advanced customization options for your checkout and know Javascript?
You can view this help center article for documentation about the available methods, events & properties.
You're all set!
You have now successfully learned how to set up analytics tracking using additional checkout scripts in Booqable.