No data shows
Ad blockers, allowed hostnames, cache, and other common causes.
Go through these checks in order.
1. Make a test visit first
Open your website, then open Real-time in Dodolytics. If your visit shows there, tracking works. See Check that tracking works for the full steps, including the check in your browser's Network tab.
2. The script is not on the live page
- Open your website, right-click, and choose View page source. Search for
tracker.js. If it is not there, the script is not installed on that page. - Make sure you saved and published the change. Website builders often need a separate publish step.
- Clear the cache of your cache plugin, your host, or your CDN. An old copy of the page does not have the script.
- Put the script in a shared header or template, so that every page has it.
3. The website ID is wrong
The data-website-id in the script must match the ID on
Settings ›
Installation of this website. Dodolytics
ignores data with an unknown ID and shows no error. If you are not
sure, copy the script again and replace the old one.
4. Allowed hostnames block the visits
Open Settings ›
Hostnames. If Count data only
from… is on, visits from domains that are not in the
list are not counted. This includes localhost and
preview or staging domains. Subdomains of a listed domain always
count. Add the missing domain, or turn the setting off.
5. Your own visits are excluded
Dodolytics does not count some visits on purpose. Check these if your own test visit does not show:
- You test on
localhostor another local address. The script does not count these unless the script hasdata-allow-localhost="true". - You excluded this browser with
?dodolytics_ignore=true. Open your site with?dodolytics_ignore=falseto count it again. - Your IP address is in Settings › Exclude visits.
- The page matches a path in the script's
data-excludeoption.
6. Ad blockers and privacy extensions
Some ad blockers and privacy extensions block analytics scripts, and they can block Dodolytics too. Test in a private window with your extensions off. Visitors who use these tools are not counted, so your numbers can be lower than your server logs.
7. Your site's Content Security Policy
If your website sends a Content-Security-Policy header,
it must allow the script and its requests. The browser console
shows a "Content Security Policy" error when it blocks them. Add
dodolytics.com to these two rules:
script-src 'self' https://dodolytics.com;
connect-src 'self' https://dodolytics.com;
Keep the other sources that your policy has now. For nonces, 'strict-dynamic', and where a policy is set, see Content Security Policy.
8. Only the first page of a visit shows
In a single-page app (Next.js, React, Vue, and others), the script records a page change when the app changes the address with the browser's history (as the usual routers do). If your app shows a new page but the address in the browser does not change, there is no new page for the script to see.
Apps that keep the page in the part after # (hash
routing, for example /#/pricing) are recorded as one
page, because the path does not change. Add
data-hash="true" to the script to record each hash
page. See Tracking script options.
9. The numbers look wrong for "today"
Reports use the timezone of the website to decide where a day starts and ends. If your visits show on the wrong day, check Settings › General › Timezone.
Still no data?
Ask on our feedback board. Tell us your website's domain and what you see in the Network tab. Do not post private data.
Related articles
Still need help? Ask on our feedback board or see all topics.