Skip to content
New: GA4 dashboards, server-side conversions to every ad platform, Consent Mode v2 generation, and publish approvals.See what shipped

Documentation

Setup, platform installs, monitoring, and the API. Written to be followed, not skimmed.

AI co-pilot

TagEasy includes three AI-powered features that speed up setup and debugging. They run on either OpenAI or Anthropic, depending on which API key is configured.

What the AI co-pilot does

  1. Suggest events — looks at your site, recommends what to track
  2. Normalize taxonomy — renames inconsistent events to the standard convention
  3. Debug events — explains why a specific event isn't firing and how to fix it
  4. AI Insights — writes plain-English narratives + recommendations from your GA4 data

1. Suggest events

From your website's Events tab, click + AI suggest. TagEasy:

  1. Fetches your homepage HTML (server-side, SSRF-safe)
  2. Sends it to the AI with the existing list of tracked events
  3. Returns 5-10 high-confidence suggestions: which CTAs to track, which forms, which page-load events, with selectors and proposed event names
  4. You pick which ones to apply → TagEasy creates real VisualEvents

This works best on conversion-driven pages — landing pages, product pages, signup flows. For very large or single-page-app sites, you may want to point it at a specific URL using the optional url parameter.

2. Normalize taxonomy

Useful when you've been adding events ad-hoc and event names have drifted away from the standard. From the Events tab → click Normalize taxonomy:

  1. TagEasy sends the current event list to the AI
  2. AI proposes renames that match {platform}:{provider}:{event}:{websiteSlug}
  3. You see a diff: old name → new name, per event
  4. Accept → TagEasy renames + regenerates GTM tags

Heads up: renaming resets verification history for each renamed event. The new name needs to start firing fresh.

3. Debug events

From the Health tab → click any event →Debug with AI. TagEasy:

  1. Gathers the event metadata + the last 30 days of health logs + verification stats
  2. Asks the AI: likely cause? severity? specific fix steps?
  3. Returns a structured response: likelyCause, severity (low/med/high), fixSteps (1-3 bullets), gtmChanges (what to update in GTM)

Common debug outputs: "selector no longer matches", "page URL changed", "trigger filter too narrow", "GTM tag paused".

4. AI Insights

On a GA4-connected website, the AI Insights tab turns your analytics into plain-English narratives. TagEasy pulls your GA4 metrics (this period vs. the previous one) and the AI writes 2–3 specific, actionable insights — "add-to-cart is up 30% but purchases are flat, likely a checkout problem" — each with a recommended next step. Generate them on demand, or let the weekly job refresh them automatically. Rate the insights and the co-pilot learns what's useful to you.

Rate limits

Each org can make AI_RATE_LIMIT_PER_ORG_PER_HOUR AI calls per hour (default 30). When you hit the limit, calls return 429 with a retry-after window.

Privacy + data handling

  • The co-pilot sends event metadata + HTML snippets to the configured AI provider — not user PII, login state, or customer data
  • HTML fetching is SSRF-safe — only public URLs from your domain are allowed
  • Calls are logged in AiAuditLog with the input hash + token counts, never the full prompt content
  • If both OPENAI_API_KEY and ANTHROPIC_API_KEY are unset, AI features are silently disabled (the buttons gracefully no-op)

Switching providers

Set the AI_PROVIDER env var to either:

  • openai — uses OPENAI_API_KEY, model defaults to gpt-4o-mini
  • anthropic — uses ANTHROPIC_API_KEY, model defaults to claude-haiku-4-5 (Claude Haiku 4.5)

Both providers use the same prompt template, so switching between them produces near-identical output. Pick whichever you already have an account with.

What the AI is NOT

  • It can't directly edit your GTM container
  • It can't see your real user analytics data
  • It can't guarantee that suggested events are the right ones for your business — review before applying

Treat it as a knowledgeable assistant, not a tracking expert who knows your goals. The Health system + verification script + AI co-pilot together cover most setup + maintenance needs.