DataSag guides · Updated 27 October 2026
Exclude your own analytics visits on your website
Open your website with datasag_ignore=true to exclude that browser from future DataSag tracking for the installed project. The current tracker stores the choice in localStorage when the browser permits it.
Before you start
Install the DataSag script once on the pages you intend to measure. Use the public key from the project you are inspecting. Publish your change, then test the public domain rather than relying on an editor preview.
Account credentials, database credentials and provider API keys do not belong in the tracking snippet. Keep existing consent controls in place. Report availability depends on your current plan and provider connections.
Exclude your own analytics visits: step by step
- Open the public site with ?datasag_ignore=true. If the URL already has a query string, add &datasag_ignore=true. Use the browser profile you use for editing or checking the site.
- Reload while recording /api/track requests. The tracker should no longer dispatch events for the excluded project in that browser.
- Navigate to another page and check again. When localStorage is available, the project-specific choice survives navigation and later visits on the same origin.
- Repeat the opt-out in each browser profile and device you use. Private windows and different domains do not necessarily share storage.
- To resume collection for a controlled test, open ?datasag_ignore=false, then visit a fresh path or reload. Confirm a pageview request before relying on the test.
- Keep a test log so you know which browser is excluded. This switch does not remove historical visits, filter an entire office IP range or disable server-side traffic sources.
https://example.com/?datasag_ignore=true
// Restore collection in this browser:
https://example.com/?datasag_ignore=falseWhat a successful check looks like
The excluded browser stops sending events, while an included browser still records visits. Previous report history remains unchanged.
Record the tested URL, date, browser state and observed request. Repeat on a nested page to check the shared installation. Keep the evidence so you can distinguish a later regression from a report-filter change.
Common mistake
If browser storage is blocked, persistence may be limited to the current document. The exclusion is browser and origin scoped, not an account-wide filter.
Find your platform's installation point
- Next.js App Router
- Next.js Pages Router
- React with Vite
- Astro
- SvelteKit
- Nuxt
- WordPress
- Webflow
- Framer
- Shopify storefront themes
- Squarespace
- HTML websites
- Laravel Blade
- Django templates
- Flask with Jinja
- Ruby on Rails
- Express with EJS
- Remix v2
- Angular
- Vue with Vite
- Standalone Blazor WebAssembly
- PHP templates
- Gatsby
- Hugo
- Ghost
- Carrd
- Docusaurus
- VitePress
- Material for MkDocs
- Jekyll
- Eleventy
- Hexo
- Pelican
- Grav 1.7 Twig themes
- Drupal Twig themes