Skip to content

Compliance

My analytics fires before consent

Consent has to precede the tracking request, not follow it. A banner that appears while the script is already running does not make the processing lawful, and this is the configuration regulators actually check. It is also the default outcome of pasting a snippet into a layout file.

What 13x checks

This is rule compliance.tracker-before-consent in the public registry: No trackers fire before consent. It runs on every audit, against the pages we actually fetched, and its result is derived from the response rather than estimated.

Surface
Compliance
Score weight
16 of the readiness score
Scope
Runs on every audited page
Applies
Only where the market or the page shape makes it relevant

Registry version 2026-07-30. Every rule is published, and the audit is deterministic — the same page produces the same finding every time.

The fix

The same text the audit hands you when this check fails on your own site.

These load unconditionally, before consent can be given: .

The script must not execute until the visitor has opted in. Loading it and "not sending events yet" does not help — the request itself already transmits the IP address.

html code
<!-- Wrong: runs on page load -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXX"></script>

<!-- Right: parked on a non-executable type, unblocked by the consent tool -->
<script
  type="text/plain"
  data-cookieconsent="statistics"
  async
  src="https://www.googletagmanager.com/gtag/js?id=G-XXXX"
></script>

In a React or Next app, mount the script only after consent instead:

tsx code
{hasConsent && <Script src="https://www.googletagmanager.com/gtag/js?id=G-XXXX" />}

Verify it with a hard reload and the Network tab: before you click accept, there should be no request to the tracker's host.

Does your site have this problem?

13x checks this and 112 others against your live URL in about 30 seconds. No account, and every finding comes with the fix for your framework.

No signup. Results in 30 seconds.

More compliance checks