Skip to main content
sus.botdocs
  • SEO
  • AI
  • QA
  • Privacy
  • Accessibility
  • Security
  1. Docs
  2. QA
  3. Tag coverage
  4. An analytics tool is missing on some pages, loaded twice or fires before consent

QA finding

An analytics tool is missing on some pages, loaded twice or fires before consent

QA Warning Severity: Medium

Part of the audit Tag coverage. Finding id: qa.analyticsTagCoverage.

What it costs you

The figures in your analytics reports do not describe the whole site.

What to do

Load the tag once on every page, through the same mechanism, and behind the consent check.

What it checks

  • Page missing the tracking tag
  • Tracking tag installed twice
  • Tracking tag runs before consent

How to fix it

Add the tag to the pages that miss it

  1. Check the template_id of the pages in the evidence. Pages of one template usually miss the tag together.
  2. Add the tag or the tag manager snippet to that template, in the same way the other templates load it.

How to check: Reload a page from the evidence with the network panel open: there is one request to the tool.

Remove the second copy of the tag

  1. Search the page source and the tag manager container for the script address in the evidence.
  2. The usual pair is the template and the tag manager. Keep one and remove the other.

How to check: Reload a page from the evidence with the network panel open: the script is requested once.

Hold the tag until consent

  1. Find where the tag is loaded: in the template or in the tag manager.
  2. Make it wait for the consent signal of your consent tool.

How to check: Open a page from the evidence in a fresh browser profile with the network panel open: no request goes to the tool before you accept.

Load the tag once, everywhere, after consent

  1. Check the template_id of the pages in the evidence.
  2. Load the tag in one place only, on every template, behind the consent check.

How to check: Reload a page from the evidence with the network panel open: one request to the tool's script, and none before you accept.

A real case

After a server upgrade to PHP 8.1, a code snippet plugin found an error in an unrelated line of the snippet that also held the Google Analytics tag, and quietly set the whole snippet to draft. The site recorded no analytics data for three days.

Source: WP Remote blog, 3 November 2023

Thresholds

Thresholds for An analytics tool is missing on some pages, loaded twice or fires before consent
NameDefaultMeaning
min_share_percent50A tool counts as the site's analytics when more than this percentage of the HTML pages contact it. Pages without it are then reported as missing the tag.
  • All audits
  • About sus.bot
  • Open the app
  • Contact support