Skip to main content

Command menu

Jump to a page or search the catalog

AI Tools & Scripts

Analytics Tag Privacy Check

Check tracking code before release: emails and names sent to Google Analytics, Measurement Protocol secrets in the browser, consent set after tags fire, Consent Mode v2 gaps, Universal Analytics leftovers and recordings of typed input.

$5.00

What you get: 1 file · 48.82 KB · ZIP

See purchase options

Product description

gtag('event', 'sign_up', { email: user.email }) puts your customers' email addresses into Google Analytics, which Google's policies forbid. A gtag('consent', 'default', ...) placed one line below gtag('config') does nothing for the first page view, and an api_secret in a sendBeacon call lets anyone send fake events into your reports. This skill finds those and seven other tracking privacy mistakes before release, and tells you how to fix each one.

Your agent runs a scanner on your pages and templates (HTML, Liquid, PHP, ERB, Nunjucks, Handlebars, Twig, Jinja, Vue, Svelte, Astro), JavaScript and TypeScript, server code that calls analytics APIs (Python, Ruby, Go) and Google Tag Manager container exports. It reads the Google tag (gtag.js), Tag Manager snippets and exports, Firebase Analytics, Meta Pixel, TikTok pixel, Segment, RudderStack, PostHog, Mixpanel, Amplitude and session recorders (Sentry Replay, LogRocket, rrweb, Hotjar, Clarity, FullStory). It reads scripts inside pages and inside Next.js Script template strings, follows template values such as {{ customer.email }}, knows the official channels for contact details (gtag user_data, Meta advanced matching, ttq.identify, identify calls) and hashed or redacted values, so it does not report them, and orders consent the way browsers run scripts (scripts held back until consent, module and Partytown scripts, Next.js Script strategies). It never runs your code or loads the tags. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach, and every rule links the official documentation behind it. Secrets are never printed. It is a technical check, not legal advice.

What it checks

BLOCK (fix before shipping)

  • T01: emails, phone numbers, names, street addresses, birth dates or ID numbers sent to Google Analytics (gtag and sendGAEvent events, config, user_id, user properties, Firebase Analytics, GA4 tags in Tag Manager exports)
  • T02: server-only analytics credentials in code or in browser scripts (Measurement Protocol api_secret, Meta Conversions API and TikTok Events API tokens, PostHog personal keys, Mixpanel and Amplitude secrets); browser tokens of other services such as Mapbox are not reported
  • T03: consent defaults set after tags fire (gtag consent default after config, event or the Tag Manager snippet; fbq consent revoke after init or track)

REVIEW (check before release)

  • T11: the Google tag loaded with no consent default, consent banner or consent check in the project
  • T12: consent defaults without the Consent Mode v2 fields ad_user_data and ad_personalization (Google infers only ad_user_data for EEA visitors)
  • T13: consent granted to every visitor by default, with no regional default
  • T14: Universal Analytics leftovers (UA- IDs, analytics.js, UA tags in Tag Manager exports, anonymize_ip)
  • T15: the same GA4 measurement ID configured twice in one file
  • T16: session recordings that capture typed input (masking turned off, LogRocket or rrweb defaults, data-hj-allow, fs-unmask, data-clarity-unmask on the page or a form)
  • T17: personal data in dataLayer pushes, Meta and TikTok pixel events, and Segment, RudderStack, PostHog, Mixpanel or Amplitude event properties

What's included

  • The scanner (Python 3.9+, standard library only)
  • A rules guide with the reason, safer approach and official documentation link for each rule
  • A risky and a safe example project (a shop and a landing page), and the real report the scanner produces on the risky one

Limits

It reads each file as written: values built at run time or in other files, tags set up only in the Tag Manager or vendor web interface, Tag Manager consent settings, server-side (sGTM) containers and mobile app SDKs are not checked. Whether consent is legally required depends on your visitors and your legal basis; this is not legal advice. NOT FLAGGED is not a guarantee.

Contents

One ZIP file with 23 files: SKILL.md, the scanner in scripts/ (6 Python files), references/rules.md (every rule with its reason and safer approach), and examples/ (14 example files plus report.md, the real scanner output on the risky example).

How to use: This is an agent skill: a folder with a SKILL.md file and Python scripts that an AI coding agent such as Claude Code, Cursor, or Codex CLI can run. Unzip it into your agent's skills folder (for Claude Code: ~/.claude/skills/), then ask your agent to check your project. The scripts also run on their own with Python 3.9 or newer, with nothing to install. They read your files only: no network access, and nothing is sent anywhere.

What you get

1 file · 48.82 KB

  • analytics-tag-privacy-check-1.0.0.zipZIP · 48.82 KB
LicenseCommercial use allowed
Package checkPassed

Getly opened the uploaded files and found nothing that would stop them opening. It is not a virus scan or a quality rating.

PublishedNov 12, 2026
File size48.82 KB
File formatZIP
Versionv1.0

Tags

analyticsprivacyconsent-modegoogle-tag-managertrackingai agent skill
R
RR HH

Frequently asked questions

Do I get access instantly?

Yes. This is a digital product - you can download it right after checkout, straight from your library.

Can I use it for commercial projects?

Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.

What's your refund policy?

You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.

What file formats and sizes will I get?

You'll download 1 file - ZIP - 48.82 KB in total.

Do I get free updates?

Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.

Price

$5.00