Custom checkout scripts let you use tracking systems like Google Analytics, Facebook Ads and others on the checkout of your online store. This way you can create sales funnels and keep track of even more stats to make your business more successful.
You can also use custom checkout scripts to slightly modify the behavior of your checkout, for example by adding a support chat or replacing the logo.
For your convenience we've added some methods for common features. You can read about them here:
Loads an external script from an URL. Also makes sure the script is only loaded once.
Loads jQuery 3. Whenever you want to use jQuery, wrap your code inside the callback of this method. Inside, you can use
Booqable.setupGoogleAnalytics(trackingId: string, defaultEvents = true)
Sets up Google Analytics with the given tracking ID. Afterwards, you can use
gtag() . With the default events we set up page tracking for the information, payment & completed steps.
Booqable.setupFacebook(fbId: string, defaultEvents = true)
Sets up Facebook Ads with the given Facebook ad ID. This is also called Facebook Pixel. With the default events we set up tracking for the InitiateCheckout, AddPaymentInfo & Purchase events.
Booqable.on(event: string, callback: function, context?: object)
Executes the callback when the event is triggered. You can find the events below.
page-change Is triggered when the page changes or is first loaded.
information Is triggered when the information step of the checkout is shown.
payment Is triggered when the payment step of the checkout is shown.
completed Is triggered when the success message is shown. The user has completed the checkout.
Booqable.location: string The relative URL of the page that the store is currently on.
Booqable.origin: string The origin defined in the URL of the checkout. Can be used for tracking, or to modify the branding of the checkout.
If you need assistance with checkout scripts please contact our Support team at firstname.lastname@example.org