Skip to main content


Sometimes it is necessary to ensure all events have been published to the ABsmartly collector before proceeding. To do this, you can explicitly call the context.publish() method.

// You can just publish

// or wait for it to finish, so if you want to
// navigate to another page without losing impressions,
// you can do that once the promise resolves.
context.publish().then(function () {