Custom Widgets: Helpers
Last updated
Was this helpful?
Each script throughout the platform has access to a handful of functions : Account Javascript, targeting code, campaign Javascript, custom script, …
To call them, you need to use the variable HELPERS within the code editor.
Each custom script throughout the platform is stored within an anonymous function which holds an instance of this HELPERS, so each HELPERS is independent and is relative to your current script location.
Call: new HELPERS.ABTastyCookie();
Returns an object containing all the information about AB Tasty cookies in a more human readable way.
Not usable at the moment
Details about the AB Tasty session cookie.
Already contained within ABTastyCookie.
Contains data relative to the campaign from which the HELPERS was called.
Usage of alreadySeenOneTest: HELPERS.campaign.alreadySeenOneTest(new HELPERS.ABTastyCookie())();
forceUntracking and stopTargetingPerf are not usable.
Contains the campaign id from which the HELPERS was called.
Takes two mandatory arguments.
First one is a function that must return a boolean value.
Second argument is callback function that will be called once the first argument returns true.
First argument is called each 100ms, second argument is executed only once.
Gives the information about your current geolocation. Data is fetched from the session storage ABTastyGeoloc entry.
Gives the information about your current user agent. Data is fetched from the session storage ABTastyUA entry.
Embedded package:
Documentation available here: https://github.com/js-cookie/js-cookie
Contains the variation id from which the HELPERS was called.\
Last updated
Was this helpful?
Was this helpful?

