Created
May 25, 2022 15:02
-
-
Save nicjansma/6161d0293199ad65e1093c07ce6f881a to your computer and use it in GitHub Desktop.
Boomerang DisableUnloadBeacon plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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