Troubleshooting

Common issues and solutions when the Rybbit tracking script isn't sending traffic

If you've installed the Rybbit tracking script but aren't seeing any traffic in your dashboard, this guide will help you diagnose and fix common issues.

Check if the Script is Loaded

The first step is to verify that the Rybbit script is properly loaded on your page.

Open Your Browser's Developer Console

Right-click anywhere on your webpage and select Inspect (or Inspect Element). Then click on the Console tab at the top of the panel that opens.

Alternatively, you can use keyboard shortcuts:

  • Windows/Linux: Press Ctrl + Shift + J or F12
  • Mac: Press Cmd + Option + J

Type "rybbit" and Press Enter

In the console, type rybbit and press Enter.

If you see an error like the one below, the script didn't load at all. Continue reading for common causes.

Uncaught ReferenceError: rybbit is not defined

If you see an object with functions like {event: ƒ, pageview: ƒ, identify: ƒ, …}, the script file loaded, but that doesn't prove tracking works. The script creates this object before it reads its configuration, and it stays a placeholder that queues your calls if the site ID is missing. Browsers that opted out (see Hiding your own traffic) get an object whose functions do nothing.

Check the Console and Network Tab

Look in the console for messages from the script, such as Please provide a valid site ID using the ?siteId= query parameter or the data-site-id attribute or Failed to fetch tracking config from API, using defaults.

Then open the Network tab and reload the page. A working install makes a request to /site/tracking-config/YOUR_SITE_ID followed by POST requests to /track. If you see neither, the script stopped before tracking anything.

Common Issues

Data Attributes Being Stripped

Some platforms, content management systems, tag managers, and "delay JavaScript" optimizers automatically remove or sanitize data-* attributes from script tags, or rebuild the tag from a data-src placeholder and drop everything else. If your site ID was in a data-site-id attribute, it gets removed and the script logs Please provide a valid site ID.

Platforms known to strip attributes:

  • Google Tag Manager
  • WordPress optimization plugins with "delay JavaScript" enabled (WP Rocket, Perfmatters, FlyingPress, LiteSpeed Cache)
  • Some WordPress page builders
  • Certain website builders (Webflow, Wix, Squarespace in some configurations)
  • Some CDN or caching plugins

Solution: Put the site ID in the script URL instead of a data attribute. Optimizers preserve the URL:

<script src="https://app.rybbit.io/api/script.js?siteId=YOUR_SITE_ID" defer></script>

If your platform also rewrites the src, inject the script from JavaScript instead:

<script>
  (function() {
    var el = document.createElement("script");
    el.src = "https://app.rybbit.io/api/script.js?siteId=YOUR_SITE_ID";
    el.defer = true;
    document.head.appendChild(el);
  })();
</script>

For detailed Google Tag Manager setup instructions, see our Google Tag Manager Guide.

Ad Blockers

In rare cases, ad blockers may block the Rybbit tracking script. While Rybbit is privacy-focused and doesn't use cookies for tracking, some aggressive ad blockers may still flag analytics scripts.

How to check if an ad blocker is the issue:

  1. Temporarily disable your ad blocker
  2. Refresh the page
  3. Check the console again for the rybbit object

Solutions:

  • For your own testing: Disable your ad blocker or add your site to the allowlist
  • For your visitors: Consider setting up a proxy to serve the script from your own domain, which significantly reduces the chance of being blocked

Script Not in the Right Location

The Rybbit script should be placed in the <head> section of your HTML. If it's placed in the wrong location or loaded after the page has already finished loading, it may not work correctly.

Verify the script placement:

  1. View your page source (right-click → View Page Source)
  2. Search for rybbit or script.js
  3. Confirm it appears within the <head>...</head> tags

Incorrect Site ID

Double-check that the siteId in your script URL (or your data-site-id attribute) matches the site ID shown in your Rybbit dashboard.

  1. Go to your Rybbit dashboard
  2. Navigate to your site's settings
  3. Copy the site ID and compare it with what's in your script tag

Content Security Policy (CSP) Blocking

If your site has a strict Content Security Policy, it may block the Rybbit script from loading or executing.

Check for CSP errors:

  1. Open the browser console
  2. Look for errors mentioning "Content Security Policy" or "CSP"

Solution: Add the Rybbit script domain to your CSP headers:

script-src 'self' https://app.rybbit.io;
connect-src 'self' https://app.rybbit.io;

If you're self-hosting Rybbit, replace app.rybbit.io with your Rybbit instance domain.

Script Loading Too Late in SPAs

In single-page applications (React, Vue, Next.js, etc.), if the script loads after the initial page render, the automatic pageview might not fire.

Solution: Ensure the script is in your root HTML template (like index.html or _document.js in Next.js), not dynamically imported in a component.

For Next.js specifically, see our Next.js Guide.

Testing Your Installation

Once you've made changes, verify that tracking is working:

  1. Trigger a test event: In the console, run:
    rybbit.event("test_event")
  2. Check the Network tab: In browser dev tools, go to the Network tab, filter by "track", and look at the request and its response
  3. Check your dashboard: Navigate to the Events tab in your Rybbit dashboard and look for "test_event" (it may take a few seconds to appear)

A 200 response from /track doesn't mean the event was stored. Excluded, bot-classified, over-limit and no-plan events all get 200. Read the response body: {"success":true} means accepted (unless the hit was classified as a bot), a message field means an exclusion matched, and a plain-text body means the site is over its limit or has no plan. The dashboard is the real test.

Still Having Issues?

If you've tried all the above and are still not seeing traffic:

  1. Check the browser Network tab for any failed requests to your Rybbit instance
  2. Verify your site ID is correct in the dashboard
  3. Check if traffic is being filtered: review the site's exclusions (IP, country, ASN, path, query parameter, hostname and user agent) and your own traffic settings
  4. Check bot detection: hits from headless browsers and automation tools (Puppeteer, Playwright, Selenium) are classified as bots and, with bot blocking on, stored as bot traffic instead of analytics. A cloud or hosting network (a VPN, a CI runner, a cloud desktop) doesn't convict a hit on its own, but it counts against a hit that already looks automated. Test from a normal browser. See Bot Detection.
  5. Check your plan and usage (Rybbit Cloud): once a site passes its monthly event limit, new events are dropped until the next month or an upgrade. Sites created on or after February 13, 2026 collect nothing while their organization has no trial or paid plan. After a trial ends unpaid, the organization's sites keep collecting for 60 days, then stop.
  6. For self-hosted instances: ensure your Rybbit server is running and accessible

Related Documentation:

On this page