Script your Google Tag Manager conversion setup
Claude Code adds dataLayer events, creates Ads conversions by API and builds triggers, GA4, Ads and Meta tags via the GTM API.
Prompt for your agent
Goal: Instrument conversion tracking in an afternoon, repeatably. Setup: agents used in source: Claude; tools/MCPs stated: Google Tag Manager API, Google Ads API, GA4, Meta Pixel. Steps: 1. In your app repo, have Claude Code add a dataLayer.push for every key event (signup, demo booked, trial started, checkout). 2. Create a Google Cloud project, enable the Tag Manager API and set up OAuth with tagmanager.edit.containers and tagmanager.publish scopes. 3. Have it create each conversion action via the Google Ads API to get IDs and labels. 4. Have it write a script that builds, in a new GTM workspace: a custom-event trigger per event, GA4 event tags, Ads conversion tags, Meta pixel tags, and data-layer variables for value, currency and hashed email. 5. The script creates a version and publishes; verify every tag fires in GTM preview mode. Rules: ask me before anything irreversible (sending, posting, paying, deleting); don’t invent data, results or tools I haven’t given you; tell me what you couldn’t verify. Based on: Cody Schneider — https://x.com/codyschneider/status/2100645989828669785
Steps are from the source. Includes a “Based on” credit line.
I tried this
Tell the next builder. One anonymous answer each; click again to undo.
Agents, models and tools only what the source states
- Agents
- Claude
- Tools
- Google Tag Manager API
- Google Ads API
- GA4
- Meta Pixel
Sources & credit
- Cody Schneider @codyschneider primaryX post · 17 Sep 2026https://x.com/codyschneider/status/2100645989828669785