google-analytics-4 SKILL.md skillF

google-analytics-4 from ziniman/ai-instruct is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add ziniman/ai-instruct/google-analytics-4@git:20260420.0a6f905

Pins git:20260420.0a6f905 in mdr.lock. Pin the fingerprint instead.

Audit grade
F, 15 of 17 checks passed
Kind
SKILL.md skill
Repository
ziniman/ai-instruct
Path
skills/google-analytics-4/SKILL.md
Versions recorded
1
Latest version
git:20260420.0a6f905, committed Apr 20, 2026
Size
21,308 bytes
Repository stars
29
License
Apache-2.0

Use this skill whenever the user installs, configures, or debugs Google Analytics 4, or mentions gtag.js, GTM, conversion tracking, e-commerce events, or a cookie/consent banner tied to analytics. Covers installation, event tracking, user properties, e-commerce, Consent Mode v2 for EU/UK visitors, SPA pageview tracking, and BigQuery export. Skip for other analytics products (Plausible, Mixpanel, PostHog, Segment), Universal Analytics (sunset 2024), or server-side-only tracking.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Google Analytics 4 Implementation Guide

> Applies to: Any website or web app | Updated: February 2026

A practical guide for implementing Google Analytics 4 (GA4)  -  covering installation, critical first-time setup, event tracking, e-commerce, consent, and advanced topics. Written for AI coding assistants: skip sections that don't apply to the user's setup.

> **Note:** Universal Analytics (UA / GA3) was fully sunset in 2024. GA4 is the only current Google Analytics product.

---

## Section 0: Before You Start

Answer these questions before writing any code. They determine which sections apply.

**Q: Are any of your visitors in Europe (EU/EEA) or the UK?**
Default: no  -  if yes, Consent Mode v2 setup is required (see [Consent Mode v2](#consent-mode-v2))

**Q: Do you run Google Ads (search, display, YouTube, or Shopping)?**
Default: no  -  if yes, ad consent signals matter for conversion tracking and which events you mark as conversions

**Q: Is your site a single-page app (React, Vue, Angular, Next.js, etc.) where the URL changes without a full page reload?**
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add ziniman/ai-instruct/google-analytics-4@sha256:33cff546e77eea52

The line at the top of this page pins the label git:20260420.0a6f905, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_fej5w2mnbigngfse.svg)](https://markdownregistry.com/a/art_fej5w2mnbigngfse)

1 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Apr 20, 2026.

versioncommittedcommitsizeaudit
git:20260420.0a6f905 latest2026-04-20 0a6f905 21,308 BF view

Audit of the latest version

F  15 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • FAIL, critical: No text hidden with inline styles (matched: style="display:none;visibility:hidden)
  • fail: No script tag (matched: <script)
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (21308 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address

Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.

Source

GitHub

ziniman/ai-instruct · 29 stars · license Apache-2.0 · pushed 2026-10-20 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_fej5w2mnbigngfse
GET https://markdownregistry.com/api/v1/resolve?ref=ziniman/ai-instruct/google-analytics-4
GET https://markdownregistry.com/api/v1/blob/33cff546e77eea52bf63e8f5bab2f95de87ade13812a02039f155d46c4780e46

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from ziniman/ai-instruct

CLAUDE.md CLAUDE.md file
ziniman/ai-instruct · CLAUDE.md
git:20261020.684a87e · audit A · 29 stars
llms.txt llms.txt file
ziniman/ai-instruct · llms.txt
git:20260311.73a01d3 · audit A · 29 stars
aws-spa-deploy SKILL.md skill
ziniman/ai-instruct · skills/aws-spa-deploy/SKILL.md · Use this skill whenever the user is deploying a React/Vite single-page app to AWS, or mentions Amplify, CDK, or wiring…
git:20260420.0a6f905 · audit A · 29 stars
seo-llmo SKILL.md skill
ziniman/ai-instruct · skills/seo-llmo/SKILL.md · Use this skill whenever the user is building, reviewing, or preparing to launch any public-facing website or web app…
git:20260427.399cd67 · audit B · 29 stars
web-accessibility SKILL.md skill
ziniman/ai-instruct · skills/web-accessibility/SKILL.md · Use this skill whenever the user is building or reviewing any web UI. Accessibility is a baseline requirement, not a…
git:20260420.0a6f905 · audit A · 29 stars
web-performance SKILL.md skill
ziniman/ai-instruct · skills/web-performance/SKILL.md · Use this skill whenever the user is improving Core Web Vitals or page load performance, or mentions slow pages…
git:20260502.4621eea · audit B · 29 stars

Every file in ziniman/ai-instruct

Browse by kind, by grade F, or by owner.