Articles on: Kite - Free Gift App

How to add custom JS scripts to alter Kite widgets

This guide provides an overview of the Custom JS Script feature, an advanced setting that allows developers to add custom logic to alter or extend the behavior of

Kite widgets.


Disclaimer: This is an advanced feature that requires knowledge of JavaScript. Incorrect implementation can affect your store's functionality. Please proceed with caution or contact our support team for assistance with specific scripts.


What are Custom JS Scripts and Event Hooks?


The Custom JS Script feature allows you to execute your own JavaScript code at specific moments in the customer's journey on your storefront. These moments are called "event hooks." By using these hooks, you can add custom functionality, resolve theme-specific conflicts (especially with side-carts or AJAX carts), or modify the default behavior of a Kite widget.


Available Scripts and Hooks


The Custom JS script section provides several areas to inject code based on your needs:

  • General Custom Logic: This area allows you to write JavaScript that responds to built-in Kite events. It is often used to solve integration issues with third-party themes, particularly those involving dynamic cart updates.
  • Custom BOGO Scripts: This refers to specific script templates or hooks that allow for advanced or dynamic "Buy X Get Y" (BOGO) offers that may not be possible through the standard user interface.
  • Custom Logic for Page Load: This specific hook executes your script after the Kite app has fully loaded on the page. This is useful if you need to alter or override a default function after it has been initialized by the app.


Getting Assistance


Creating custom scripts can be complex. If you need a specific functionality or assistance with implementing a script, please feel free to reach out to our support team. We can help guide you or provide the necessary code for your use case.

Updated on: 25/08/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!