Fix Datasense not receiving events
What to check when the Datasense dashboard shows no visitors: localhost, ad blockers, the domain, opt-out and the script tag.
Check these in order:
- You're on localhost. The script ignores
localhost,127.0.0.1andfile:pages. Adddata-allow-localhost="true"to test locally. - An ad blocker is on. Try a private window without extensions, then set up the proxy.
- The domain doesn't match. Events are only accepted from the domain you added and its subdomains.
- You opted out on this browser. Run
localStorage.removeItem("datasense_ignore"). - The script isn't on the page. View the page source and look for
data-website-id. In the network tab,script.jsshould load and/api/eshould answer202. - A Content Security Policy blocks it. See fix CSP.
- This month's events are used up. Collection continues, but reports lock until the 1st or an upgrade. Billing shows usage.