Callback Scripts
Introduction
Several triggers can be used by Browsi Player to activate a publisher’s custom script.
These scripts can come in three supported formats.
While they can be used as a flexible solution for many use cases, the most common scenarios are analytics pixels and passbacks.
Triggers
Inventory - When the player loads to the page
Impression - When an ad starts playing
Ad completed - when an ad is played all the way through
Player closed - when a used clicks the X button to close the player
No ad - trigger a callback script when Browsi Player finishes attempting to play ads
Supported formats
GPT - this is the most commonly used format, and will run a Google Publisher Tag you provide us once Browsi Player finishes attempting to play ads.
JavaScript - snippets of JavaScript code, which can serve almost any function.
Script - a URL that links to your hosted code; similar to a JavaScript format, but gives you more control (i.e. the option to change the implemented script without going through us)
Image - also uses a URL, mostly linking to 1X1 pixels.
Notify - when a player is set to only run after being activated by a trigger code (i.e. set to a ‘waiting’ state), this makes the player trigger as soon as a previous player finishes.
Use cases
The most common use cases are:
Passback - when Browsi Player is no longer able to bring in additional ads, you may want to bring another player or a display placement to the page in its place.
Analytics pixel - integrate data solutions on the page with player events as their triggers, for example fire an ‘impression’ event to Google Analytics.