Stop tracking
Stop all tracking on a page, for example when a visitor withdraws consent.
destroy() stops Loomduct on the current page: it removes its listeners, stops its plugins and sends nothing more.
Before you start
- Loomduct installed on your site. See the Quick start.
Steps
Call destroy():
consentBanner.onWithdraw(() => {
loomduct.destroy()
})To track again on the same page, create and load a new instance. On the next page load, Loomduct starts again as usual, so also stop calling load() (see Start tracking after consent).
To stop tracking one browser for good, use the opt-out flag instead: see Exclude your own visits.
Check that it worked
After destroy(), open the browser's network tab and use the page. No request to /l/e is sent.