Troubleshooting
Fixes for a script that doesn't load, CSP errors, an install status stuck on waiting, and real visitors who get blocked.
The script doesn't load
Open the Network tab of the developer tools and reload. Look for traffic.js.
- No request at all: the snippet isn't on this page. Check your template, theme or tag manager, and that you published the change.
- Blocked or cancelled: an ad blocker or a privacy extension stopped it. Try a private window without extensions. See Ad blockers.
- Refused by Content Security Policy: see CSP errors.
- A caching or optimisation plugin rewrote it: exclude
s.geoiphub.com/v1/traffic.jsfrom combining, delaying and minifying.
CSP errors
The console shows Refused to load the script or Refused to connect. Add our hosts to your policy:
script-src https://s.geoiphub.com
connect-src https://s.geoiphub.com wss://s.geoiphub.com
worker-src blob:Add them to the directives you already have. Don't replace your other sources. See Content Security Policy.
The status stays on Waiting for first visit
Work through these in order:
- The origin isn't allowed. This is the most common cause. Compare the address bar with the website's Allowed origins, exactly:
https://example.comandhttps://www.example.comare different, a wildcardhttps://*.example.comdoesn't matchhttps://example.com, and ports must match (http://localhost:3000). Our edge network turns away visits from other origins with the errorbad_website. See Allowed origins. - The website key is wrong. Copy the snippet again from the website's Setup page.
- The website is disabled. Enable it on Websites.
initruns before the script has loaded. You seegeoiphub is not definedin the console. CallinitfromDOMContentLoaded(withdefer) or from the script'sonload, as in the snippets.- The page is opened as a file. Pages opened from
file://have no origin. Serve them from a local server and allow its origin. - Too many test reloads. One IP can open about 20 new sessions a minute. Wait a minute and try again.
See the bad_website error
In the Network tab, filter by s.geoiphub.com. Click the v1/c WebSocket and open Messages: an error looks like {"t":"err","code":"bad_website"}. On the HTTPS fallback, a v1/e request returns 403 with the same error.
Script loaded, but the first visit isn't scored
The decision is made about 3 seconds after the page loads. Keep the page open for a few seconds and move the mouse. If you close it at once, the visit is scored when it ends instead.
Visits after your monthly visit limit show as Not analysed.
A blocked visitor still gets in
- The block applies from their next page load. A page that was already open stays usable.
- The script must be on that page. Pages without it are not protected.
- On Free, nothing is blocked. On a paid plan after a downgrade, blocks are kept but not enforced. See Plans and limits.
- If our service didn't answer in time, the visitor was let in. Check the session: it shows no decision.
- A client with JavaScript turned off, or one that strips the script, is never stopped. See Can bots get around it?
Real users are getting blocked
Open one of their sessions and check This visit in the Access box. It tells you which rule blocked them.
Someone else on the same IP was blocked: an office, a school, a mobile carrier or a VPN exit. Unblock the IP. If you still want to stop the original abuser, open one of their sessions and use Block visitor instead.
You or a teammate blocked this device. Check the note on the Blocked list. If it was a mistake, unblock it.
The visit scored 70 or more. Read its reasons:
- Do they describe something a person can't do, like clicks with no pointer movement or text inserted without key presses? Then it may really be automation, for example a browser extension that fills forms.
- Do they mostly describe the network, like a VPN plus a relay? Some corporate networks look like this. Check the layer scores.
If you are sure it is a person, turn auto-block off for that website while you look into it, and send us the session id. Auto-block adds nothing to the Blocked list, so there is nothing to unblock.
To unblock someone, see Unblock someone.
Ad blockers
Some ad blockers and privacy extensions block third-party scripts, including ours. Visits where the script didn't run are not scored and not blocked, and they don't appear in Sessions. Your page works as usual for them. Serving the script through a tag manager makes this more likely.
The score changed after the visit
That is expected. The visit is scored again when it ends, with all of its behaviour. The decision made at the start doesn't change. See Two passes.