With the release of our latest version (V3) of the tag a few weeks ago, the command lines to be used in the browser console have changed.
You can determine which test you are currently seeing and which variation you are assigned to by using your web browser’s console.
- Go to the page you wish to verify.
- Display the console (right click+Inspect Element or CTRL+MAJ+ J in Chrome or F12 in Windows).
A navigation bar will open at the bottom or on the side of your screen.
- Select the Console tab.
Example in Chrome: Once the Console tab is open, several instructions (command lines) can be entered.
ABTasty.results will return all campaigns that are live on the website, even if you are not on the right page. In this case, the status will specify why you are seeing a campaign (or not).
These following statuses may apply:
- "accepted" status: you are seeing the test, the name of which is mentioned above
- "audience_rejected" status: you are being rejected from a specific test because you do not match the targeting criteria added to the campaign. To see which targetings you do not match with by clicking the targetings object listed below in the console. Each targeting criterion added to the campaign will be listed in that object and will return true (if you match the criterion) or false (if you do not match the criterion).
- "pending" status: targeting is set with AJAX mode and still waiting for the element to be present on the page before applying; or targeting includes a geolocation, IP, weather, browser, device, or DMP criterion which has not yet been found.
Example in Chrome:
ABTasty.getTestsOnPage() (parentheses are required!) will return all live campaigns on the page you are currently visiting.
Example in Chrome:
If a campaign that should be listed above is not, you can use ABTasty.results to understand, thanks to the status parameter, why you are not seeing it.
Understanding the other parameters
- name: name of the campaign you are looking at.
- type: will return the type of campaign (ab stands for a/b test, personalization, multipage, etc.)
- variationID: will return the variation you are currently seeing. 0 always relates to the Original. Any other built-in variation is a 6-digit ID.
- variationName: will return the name of the variation you are currently seeing.