Skip to content

Instantly share code, notes, and snippets.

@nicjansma
Created May 25, 2022 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicjansma/6161d0293199ad65e1093c07ce6f881a to your computer and use it in GitHub Desktop.
Save nicjansma/6161d0293199ad65e1093c07ce6f881a to your computer and use it in GitHub Desktop.
Boomerang DisableUnloadBeacon plugin
/**
* The Boomerang DisableUnloadBeacon plugin disables sending of the Unload beacon.
*
* The Unload beacon can be used to understand Session Duration (seconds on the page), but may not be needed in all cases.
*/
(function() {
window.BOOMR = window.BOOMR || {};
window.BOOMR.plugins = window.BOOMR.plugins || {};
window.BOOMR.plugins.DisableUnloadBeacon = {
init: function() {
BOOMR.subscribe("page_unload", function() {
BOOMR.disable();
});
},
is_complete: function() { return true; }
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment