Web analytics
Replaces
Google Analytics
Plausible
DataFast
Fathom
Where every visitor comes from and what they do: channels, campaigns, goals, funnels and realtime, cookieless by default.
Add analytics with Claude CodeAnalytics, a tag manager with server-side conversion tracking, email inboxes, AI search, page speed and session replay. Your coding agent sets it all up from one prompt, checks every part works, and hands you a dashboard. Free, and served from your own domain.
Paste it into Claude Code, Cursor, Codex or any agent that can make HTTP requests. No signup form, no card. Or install the skill: npx skills add StartGlobal-AI/agentfirststack
Set up our GTM infrastructure with AgentFirstStack.
Set up AgentFirstStack for this project, completely, and verify it yourself. It's free, open-source infrastructure built for agents: web analytics, a tag manager with server-side conversion tracking, email inboxes and session replay. There is no signup form: one request gets a key, and you can do every step without me. First, look at what this site uses today (Google Analytics, Google Tag Manager, Plausible, DataFast, ad pixels, any other analytics or replay tool) without changing anything. Then ask me once and wait for my answer: should email that reaches the project's inbox be forwarded to me as each one arrives, or as one daily digest (and at what time, in my time zone)? And if you found other tools: shall you bring their setup and history over, and if you need it to export their data, may you use my browser where I'm signed in? If I can't answer, forward each one as it arrives and bring over whatever needs no help from me. 1. Read https://agentfirststack.com/llms.txt and the Acceptable Use Policy (https://agentfirststack.com/acceptable-use), then follow the manual's "Full setup" section from start to finish. Read each service's manual before you use that service. 2. Key: if this project's .env already has AGENTFIRSTSTACK_API_KEY, use it, read AGENTFIRSTSTACK.md, and run the setup check (step 4) to see what earlier runs set up and what's missing. Otherwise run curl -X POST https://agentfirststack.com/v1/signup and save api_key in .env as AGENTFIRSTSTACK_API_KEY and in the production secrets. One key works for every service. If you support MCP, add the server the manual lists. 3. The full setup, in this order: - Map the site first: its main pages, every main button, link and form, and what counts as a sign-up, lead or purchase here. - Email: an inbox for the project, for any third-party signups the setup needs, forwarded to me the way I chose. - Analytics: the site, a goal for each conversion and main action, server events for what only the backend knows, AI crawler and search bot visits reported from the server (if the site has one), payments if the business takes them, and a weekly email report and alerts for me. - Tags: one container snippet on every page, an event for every main button, link and form (sent to analytics), and the conversions (also sent to the ad platforms this business uses). Preview, then publish. - Replay: linked to analytics, masked by default, asking for consent where the law requires it. - Serve all of it first-party, from the site's own domain, because ad blockers block third-party analytics hosts: a first-party domain (one DNS record: add it yourself if you can change the DNS, otherwise give it to me) or, until then or instead, the path proxy. The direct snippets only as a last resort. 4. Deploy, then test it end to end (the manual's step 8): run the setup test (POST https://agentfirststack.com/v1/setup/test, or afs_test_setup), do its browser plan in a real browser and check that visit (afs_check_test_visit), then run the setup check (GET https://agentfirststack.com/v1/setup, or afs_check_setup) until it says ready. Fix what fails and test again. 5. Apart from that first message, don't stop to ask me things. For ad accounts (Google Ads, Meta, GA4, TikTok): if you have tools for them, use them to find the IDs; otherwise finish everything else and list exactly which IDs and tokens you need from me, and where I find each. 6. Write what you set up in AGENTFIRSTSTACK.md at the repo root (ids, env var names, every goal and event and what triggers it; never key values), add the AgentFirstStack block from the manual to AGENTS.md (so later agent sessions see new features), and commit both. 7. Create a claim link with POST https://agentfirststack.com/v1/claim-link (or the afs_create_claim_link MCP tool) so I can see everything in a dashboard. When you're done, show me the setup check's table of what's set up and the test results table, then what's waiting on me, and give me the claim link. If the site used other tools, say what you brought over from each, and leave them installed until I agree to remove them.
Each one is a REST API, an MCP server and a plain-text manual your agent can set up, check and change. You get the dashboard.
Replaces
Where every visitor comes from and what they do: channels, campaigns, goals, funnels and realtime, cookieless by default.
Add analytics with Claude CodeReplaces
Payments from Stripe, Paddle, Polar and LemonSqueezy joined to the visit that brought them: revenue, MRR, churn and trial conversion by channel and campaign.
Add revenue in one promptReplaces
One snippet for every pixel and click event, with triggers, variables, preview, versions and rollback. Consent banner and Consent Mode v2 built in.
How it compares to GTMReplaces
Each conversion sent from the browser and from our servers to GA4, Google Ads, Meta, TikTok and LinkedIn with one event id, so every platform counts it once.
Server-side conversion trackingReplaces
Sessions as readable transcripts, with rage, dead and error clicks, heatmaps and surveys. Masked in the browser by default.
Session replay for AI agentsReplaces
Core Web Vitals from your real visitors, by page, device, country and browser, with the slowest pages first.
Compared with PageSpeed InsightsReplaces
Which AI bots read which pages, which assistants send you visitors, and what to change so ChatGPT, Claude and Perplexity cite you.
AI search vs visibility trackersReplaces
An inbox in one request. Verification codes and links come back to your agent the moment they arrive, and your team gets a copy.
Inboxes for AI agentsEverything each service does, all of it over REST and MCP with the same key. Compare with the tools you use now.
Product names and logos belong to their owners and are shown only to name the tools each service can replace.
This is agentfirststack.com since we launched, counted by the same cookieless analytics your agent sets up. Nothing is hidden or rounded, and the numbers update every minute.
No cookies, and no visitor ID lasts past the day. Paths and referrers are text visitors send, so this page lists only pages in our sitemap and sources analytics recognises. The full dashboard is a public share link, the same kind your agent can make for your site.
Paste it into Claude Code, Cursor or Codex. It points your agent to the manual. There's no account to create and nothing to configure.
One request gets a key for every service. Your agent installs each one, checks it works and fixes what doesn't. No email to verify.
Your agent asks only for what it can't get itself, like your ad account IDs, then sends you a link to see it all in a dashboard.
There's no paid plan, no trial and no card to add. Every project on AgentFirstStack runs free. The only limits are a fair-use policy, so no one account can use up what everyone shares.
One prompt sets up your whole GTM stack, checks it and sends you the dashboard.