The Ensighten library (Bootstrap.js file) includes several helpful functions and frameworks that assist in implementing tags across your site. You can use the following useful functions in custom rules and templates through all Ensighten products.
You must prepend all methods with the Bootstrapper namespace (or your Ensighten namespace if you've changed it from Bootstrapper) before calling them from the Bootstrapper object.
This article lists the function names, parameters, and return types along with examples of how to use them.
- imageRequest: Makes a request to an Image file.
- on: Event delegation for events such as
upon click of a button.
- unobtrusiveAddEvent (deprecated replaced by
- bindImmediate: Execute tag code immediately.
- bindDOMParsed: Execute tag code when the web page is "interactive" and is in the process of loading.
- bindDOMLoaded: Execute tag code after the page is fully downloaded.
- bindPageSpecificCompletion: Execute tag code after all Ensighten code is fully downloaded (including asynchronous files).
- hasDOMParsed: Returns the web page interactive state (before, during, or after).
- hasDOMLoaded: Returns the web page download status.
- hasPageSpecificCompletion: Returns the Ensighten code download status (including asynchronous files).
- ensEvent.trigger: Manually trigger an Ensighten event.
- getExtraParams: Add extra parameters to the Ensighten server component file to the current URL.
- getServerComponent: Call the Ensighten server component to download the asynchronous files served by Ensighten.
Helpers are used in specific situations and can be added to the Bootstrap.js file as needed. The following are some of the most used helpers. See the article: Ensighten Frameworks and Helper Functions for a full list.