How to interact with the tag
When our tag is running on a website, it offers a set of variables, constants, functions, and methods you can use to interact with it.
Everything is hosted under the window.ABTasty object. Here are the most convenient ones you might need:
ABTasty.accountData.tests
In this object, you will find all the tests that are currently active on your accounts. It displays more information than you would usually need for standard usage but this is convenient to have if you need to dig into your tests.
ABTasty.results
This object is a simplified version of the ABTasty.accountData.tests object. It will display your active tests with a focus on their current status. Are they running? If not, why have they been rejected? This is the most common object you might use to debug and QA your tests.
ABTasty.getTestsOnPage()
This object will display tests that are currently running on the page.
ABTasty.visitor.id
This object will return the visitor ID for the current visitor.
ABTasty.getCampaignHistory()
This object will return the campaign history for the current visitor. The campaign history is all the campaignID/variationID pairs that the visitor is currently assigned to.
ABTasty.accountData.accountSettings
This object will contain all the settings of the account running on the website. It is convenient to get the identifier, the account name, or various settings, such as framework version or storage mode.
Please find more in these two articles from our developers portal:
Last updated
Was this helpful?