Pubblegum Javascript Documentation

Add the Pubblegum compact js file to the head of your html page. The size of this file is a humble 1k and can be hosted local. The code should look something like this:

<script type="text/javascript" src="code/adhese_pubblegum_compact.js"></script>

In the body of your page, create a Pubblegum object instance. You should pass three parameters to the constructor:

<script type="text/javascript">
var pubble = new Pubblegum(
	"accountID", 
	"campaignID", 
	"creativeID");
</script>

Creating the object will automatically log an impression for this page, including a reference to the url of the page, you don't have to call a function.

Optionally you can log clicks and actions. A click is a basic interaction, that will be logged and then redirect to the target page passed as parameter. When sending out banner ads, you can log clicks and pass a url as parameter.

<a href="javascript:pubble.clickR('http://www.pubblegum.com');"> register a click and jump to another site</a>

An action is used for logging an event in the creative. You can add a message to each action that will be reported on separately. You could for instance log when a user starts a stream.

pubble.action('player-start'); // will be reported as "creativeID-player-start"
pubble.action('player-stop'); // will be reported as "creativeID-player-stop"