# Troubleshooting

> No visitors, wrong numbers or an agent that cannot connect. What to check.

Most problems are one of a few things. Start at the top.

## No visitors show up

1. **Open the published site, not a preview.** Editor previews in Lovable, Bolt, v0 and Replit run on another address than your site, and are not counted.
2. **Turn off your ad blocker** for the test. Some block analytics scripts, Okidoki included.
3. **Check the address in Okidoki.** It must be the address people visit, like `mysite.com`. Subdomains count, other domains do not.
4. **Look at the setup page.** It checks your home page and says what is wrong. See [Check that it works](https://docs.okidoki.sh/install/check).
5. **Publish again.** Many builders only use the change after you publish. AI coding tools like Codex, Cursor or Claude Code sometimes stop with the change made only on your computer: ask them to deploy it, or deploy it yourself.

## The tag is there, but nothing is counted

- Check that `data-site` holds the site key of **this** site. The setup page says so if it finds another key.
- Check that the tag has `src="https://okidoki.sh/js/okidoki.js"`, with no typos.
- If your site has a Content Security Policy, allow `https://okidoki.sh` in `script-src` and `connect-src`. See the [Tracker reference](https://docs.okidoki.sh/tracker#content-security-policy).
- Testing on `localhost`? It is skipped on purpose. Use the published site.

## Only the first page counts

Your builder may have put the tag on one page only. Ask it to put the tag in the shared layout or `index.html`, so it is on every page. Single-page apps need nothing extra: page changes are counted by themselves.

## Pages are counted twice

The tag is on the page twice, for example in a template and again on a page, or as both the script tag and the React component. Keep one.

## The numbers look different from my other tool

That is expected. Okidoki counts visits without recognising people, and counts everyone, not only those who accept cookies. Compare trends rather than exact numbers. See [How visitors are counted](https://docs.okidoki.sh/counting).

## Most visits are Direct

Some apps and browsers hide where a visit came from. Use [campaign links](https://docs.okidoki.sh/campaign-links) when you share your site, so those visits get a campaign and a channel.

## A filter empties the clicks and goals

Filters on source, channel or campaign only apply to the page each visit started on, because Okidoki never links a click to a visit. That is why clicks and goals are empty under those filters. See [Filters](https://docs.okidoki.sh/filters).

## Days are cut at the wrong time

Your site's time zone is probably not yours. Change it with your agent or the API. See [Sites and settings](https://docs.okidoki.sh/sites#time-zone).

## My agent cannot connect

- Check the key: it starts with `oks_` and has not been turned off.
- A **read-only** key cannot change things. Make one that may **read and change**.
- A key for **one site** cannot add sites or manage keys. Make one for **all my sites**.
- An answer with status `402` means the account needs Plus for that, or the period reaches further back than Free shows.
- For MCP, the address is `https://okidoki.sh/mcp`. In Claude and ChatGPT, sign in to Okidoki when you connect. If an app stops working, it may have been turned off under **Your AI agent**: remove the connector and add it again. Agents with a key send it as `Authorization: Bearer oks_...`. See [MCP server](https://docs.okidoki.sh/mcp).

## Someone else has my site

An address can only be in one account. If it is yours, write to [hello@okidoki.sh](mailto:hello@okidoki.sh).

## Still stuck?

Write to [hello@okidoki.sh](mailto:hello@okidoki.sh) with your site's address and what you see.

