Skip to content
All documentation pages

Reference

Troubleshooting

Most problems show up in the browser’s developer tools within a minute. Start with debug mode, then find your symptom below.

Start with debug mode

Add ?wm_debug=1 to any page address, or data-debug="true" to the tag, and open the console. The tracker logs each batch it sends and, if it stops, the reason. In debug mode it sends with fetch instead of sendBeacon, so the collector’s answer is visible in the Network tab.

Debug modeHTML
<script defer
  src="https://cdn.webmetric.io/v1/b.js"
  data-key="wm_w_your_write_key"
  data-host="https://in.webmetric.io"
  data-debug="true"></script>

Symptoms and fixes

Symptoms, causes and fixes
SymptomCauseFix
No request to /e at allThe script did not load, the tag has no data-key, or the browser sends Do Not Track or Global Privacy Control.Look in the console for a warning about data-key and in the Network tab for b.js. Test in a browser without either privacy signal.
b.js or /e fails with a blocked requestAn ad or content blocker in that browser.Test with the blocker paused. Visitors who block analytics are not recorded, and that is their choice.
403 origin_not_allowedThe page is not on the project domain or one of its subdomains. Common with staging hosts, previews and platform addresses such as myshopify.com or webflow.io.Check the project domain in Settings. A site on another domain needs its own project.
401 unknown_keyThe write key is mistyped, revoked or belongs to another project.Copy the tag again from the install panel.
410 project_deletedThe project was deleted.Create a project and use its write key.
402 quota_exceededYour organization has used its monthly events and the grace allowance.Move to a larger plan in Plan and usage, or wait for the month to reset. Data already collected is kept.
429 rate_limitedToo many events from one project in a short time.Usually code calling track() in a loop. Look for repeated calls.
400 invalid_payloadA batch failed validation.Use the tag from the install panel. If you use the npm package, update it.
Requests answer 204 but nothing appearsThe collector accepts and discards requests from known bots, from browsers that send Do Not Track or Global Privacy Control, and from your excluded IP addresses. It answers the same way either way, so a blocked scraper learns nothing.Test from a normal browser, from an address that is not in your excluded list.
The console says a script or connection was refusedYour Content Security Policy blocks the CDN or the collector.Add both sources as shown in Content Security Policy.
The tag is on the page but its data- attributes are missingA caching or optimisation plugin rewrote the tag.Exclude b.js from combining, minifying and delayed loading, then clear the cache.
Events appear a few seconds lateEvents are sent in batches every five seconds, and when the page is hidden.Wait a few seconds, or switch tabs to send the batch.
No session replaysReplay runs only on plans that include it, and not on pages with data-replay="false", or with data-replay="consent" before consent. It also pauses once the month’s recordings cap is reached.Check your plan and its recordings in Plan and usage, and the tag’s attributes.

Which domains are accepted

  • The project domain itself, such as example.com, and www.example.com.
  • Any subdomain, such as shop.example.com or staging.example.com.
  • localhost and 127.0.0.1, while Accept events from localhost is on in the project settings. It is on for a new project. Local traffic counts towards your usage, so turn it off once the site is live.
  • The other allowed hosts in the project settings: an exact host such as partner.example.org, or *.example.net for every subdomain of example.net. A wildcard does not cover example.net itself.
  • Everything else is refused with origin_not_allowed, including a different top-level domain such as example.co.uk.

Proxying the collector

Sending events through a proxy on your own server is not supported. The collector would see your server’s address for every visitor, which merges visitors together and hides their country.

Still stuck

When you are signed in, send us a message from the dashboard. It includes your organization, plan and project for you, so describe what you expected and what happened instead.