Snippet Not Detected
If your project settings page shows a red or grey "Not detected" badge on the Snippet tab, A vs B has not yet confirmed that the snippet is live and loading correctly on your website. This page walks you through every possible cause and how to fix it.
Symptoms
- The Project Settings → Snippetpage shows a "Not detected" badge.
- No experiments are running even though they are published.
- The snippet badge stays grey despite the tag appearing to be on the page.
Checklist
1
Check the script tag is in the page's head section
Open your website in a browser. Right-click anywhere on the page and choose View Page Source. Search for If you see the snippet tag in the
avsb.cloud or avb in the HTML. The snippet tag should appear inside the <head> element — not in the <body>.Correct placement
html
1<head>2 <meta charset="UTF-8" />3 <script4 id="avsb"5 src="https://cdn.avsb.cloud/snippet.js?id=YOUR_SNIPPET_KEY"6 ></script>7 <!-- rest of head -->8</head><body> instead, move it to the <head> and redeploy.2
Verify the snippet key matches your project
In the snippet tag URL, there is a query parameter that looks like
?id=abc123. This is your project's unique snippet key. Compare it to the key shown in Project Settings → Snippet. They must be identical. A typo or outdated key from a different project will prevent detection.3
Check the browser DevTools Network tab
Open Chrome DevTools (F12) and click the Network tab. Reload the page. Search for
snippet.js in the request list. You should see a request to cdn.avsb.cloud/snippet.js with a 200 status code. If you see:- No request at all — the tag is missing from the page or the browser is not loading it. Double-check step 1.
- A 404 error — the snippet key in the URL is wrong. Check step 2.
- A blocked request (red row, no response) — a Content Security Policy or network filter may be blocking the request. See step 5.
4
Look for JavaScript errors in the console
Open the Console tab in DevTools. Look for any errors mentioning
avsb or snippet. A JavaScript error during snippet initialization would prevent it from completing the detection ping. Common causes include:- A syntax error in the page's own JavaScript that runs before the snippet.
- A missing dependency that the snippet expects to exist.
- A conflicting script that overwrites
window.avsb.
5
Check for Content Security Policy (CSP) headers
Open DevTools → Console and look for CSP violation messages that mention
avsb.cloud. CSP is a browser security feature that can block scripts from external domains. If your site has a strict CSP, you need to add cdn.avsb.cloud to your script-src allowlist and api.avsb.cloud to your connect-src allowlist.Required CSP additions
text
1script-src: cdn.avsb.cloud2connect-src: api.avsb.cloud6
Check for ad blockers or privacy extensions
Ad blockers and privacy extensions like uBlock Origin, Privacy Badger, or Ghostery may block analytics and A/B testing scripts. Test in a clean Chrome profile (no extensions) or in an Incognito window with extensions disabled. If detection works without the blocker, the blocker is the cause.
Info
Ad blockers blocking the snippet only affects your own browser during testing — real visitors without blockers will see the snippet normally. However, it does mean you will not be able to test from your own browser while the blocker is active.
7
Ensure the page URL matches your project's domain
A vs B detects the snippet by checking whether the snippet loaded on the domain registered for your project. If you installed the snippet on a staging subdomain (
staging.example.com) but your project is configured for example.com, detection will not work. Check Project Settings → General to confirm the domain matches where you deployed the snippet.8
Wait a moment and refresh
A vs B polls for snippet detection periodically — it does not check in real time. After deploying the snippet, wait up to 60 seconds, then refresh the Project Settings page. If the deployment just went live, the badge may update on the next polling cycle.
Detection polls periodically — give it a moment
Even when everything is correctly installed, the "Snippet detected" badge may take up to 60 seconds to appear after your first deployment. A vs B confirms detection by receiving a ping from the snippet as it loads on a real page visit. If no one has visited your site since you deployed, the detection has not triggered yet — visit the site yourself and then refresh the settings page.
Still not working?
If you have been through every step above and detection still fails, open DevTools and run this in the Console on your website:
javascript
1console.log('avsb loaded:', typeof window.avsb !== 'undefined');2console.log('avsb object:', window.avsb);If avsb loaded: false, the snippet did not execute successfully. If avsb loaded: true, the snippet is running but the detection ping may be blocked by a network filter on your server. Contact support with the results.