Skip to main content
All CollectionsOther ToolsFAQs and Troubleshooting
Troubleshooting “Ahrefs web analytics snippet isn’t found on your website”
Troubleshooting “Ahrefs web analytics snippet isn’t found on your website”

Unable to verify that your Ahrefs Web Analytics snippet is installed? Check these common reasons first

Constance Tan avatar
Written by Constance Tan
Updated this week

Confirm the snippet is added correctly to your website

On the page you wish to use Ahrefs Web Analytics on, Right click on the page and click on Inspect. An example for the Google Chrome browser looks like this:

If you don't see this option, check if your browser needs Developer tools to be turned on.

Next, navigate over to the "Elements" tab, which allows you to see the source code of the current page:

Make sure its in the <head> element

The snippet needs to be installed in the <head> element of your website, not in the <body> or other parts of the page:

Make sure the snippet has no errors or typos

Make sure that the full snippet matches the one provided in your project settings. Check for any missing letters, punctuation like < or ".

Make sure the script is not blocked from loading

Sometimes there's nothing wrong with the snippet code on your website. However, the code may be blocked from running on the page. To confirm this, Right click > Inspect > Network and check for any error messages regarding https://analytics.ahrefs.com/analytics.js.

Here's an example of an error:

If you face a similar error message of "Violation of the Content Security Policy directive" set for your website, add https://analytics.ahrefs.com to the CSP script-src directive in your HTTP headers or <meta> tag.

Make sure AhrefsSiteAudit can see the snippet

Our crawlers visit your website to check if the snippet is installed correctly. But if it's stopped from visiting your website in some way, we won't be able to verify the installation.

Make sure the bots are allowed to visit your website

Go to https://ahrefs.com/robot/site-audit and enter in your website URL to check if our crawler can visit your website. This page also includes information about our crawler's User agent and IP ranges.

If your website cannot be reached by our crawler, you'll be provided with the reason under the "Status" column:

To resolve this, you'd need to make sure that our bots are whitelisted in your website's robots.txt, WAF, Firewall, etc. until you see that our crawler can visit your website with no issues.

Check if a pop-up or banner must be clicked before the snippet loads

Banners like this can show up for website visitors, and scripts may be stopped from running if the banner is not clicked on:

Our crawlers will not store cookies nor click on anything when visiting your website. Instead, consider whitelisting User Agent AhrefsSiteAudit to bypass the banner and see the website directly.


Still cannot get Ahrefs Web Analytics snippet to be verified? Contact support through our live chat or email [email protected]


Did this answer your question?