AI Assistants

Ad Conversion Tracking with Claude: Google Ads, Meta and LinkedIn

8 min read··By the TrackingCoder team
A Claude Code session proposing a purchase conversion on Google Ads, Meta and LinkedIn with Consent Mode v2 for six credits, pushed to a GTM workspace unpublished, with the three ad platforms checked off.
Coming soon

The MCP server and the API are not open yet. They are being tested with a few TC Pro workspaces and will be switched on for every paying subscriber shortly; nothing to install or buy in the meantime. This guide describes the flow as it will work.

Yes, you can set up ad conversion tracking with Claude, for every platform you advertise on, in one conversation. Connect Claude Code (or Claude Desktop) to TrackingCoder's website tracking MCP server, give it the conversion IDs, approve one generation per platform, and let it push the tags into your Google Tag Manager workspace. You fire one test conversion in Preview, publish, and verify in each ad platform. Here is the whole flow with the exact prompts. For the general setup of Claude itself, see website tracking with Claude.

Step 1: collect the IDs

PlatformWhat Claude needsWhere it is
Google AdsConversion ID (AW-…) and conversion labelGoals, Conversions, the action, Tag setup, Use Google Tag Manager
MetaPixel (dataset) IDEvents Manager, Data sources
LinkedInPartner ID and the conversion ID of the ruleCampaign Manager, Analyze, Insight Tag and Conversion tracking
Microsoft AdsUET tag IDTools, UET tag

Create the conversion action in Google Ads and the conversion rule in LinkedIn first; their IDs only exist once the action does. Claude cannot do that part: it never logs into an ad platform.

Step 2: connect Claude

On a paid TC Pro plan, create a key under Account, MCP & API Keys, then:

claude mcp add --transport http trackingcoder https://trackingcoder.com/api/mcp --header "Authorization: Bearer tc_live_YOUR_KEY"

Type /mcp in a session to confirm the eleven tools. Pushing to GTM also needs Google connected once in the TrackingCoder app, with the Tag Manager permission only.

Step 3: scan

Scan https://example.com with TrackingCoder. I run Google Ads, Meta and LinkedIn and I want to track purchases.

Claude reports the platform and checkout (Shopify, WooCommerce, a custom cart), the confirmation page, and the pixels already installed. That last point matters: the generated tags add the conversion event, and the base pixel should exist exactly once.

Step 4: approve one generation per platform

Generate Purchase for Google Ads AW-123456789 with label AbCdEfGhIj, for Meta pixel 1234567890, and for LinkedIn partner 987654 conversion 1122334. Container format, Consent Mode v2 on all three. Quote the total first.

Claude must state the scenario, channel, ID and cost and wait: "3 generations at 2 credits each (1 plus Consent Mode v2), 6 credits, balance 10. Go ahead?" Say yes. Each result maps the values that platform wants: value and transaction_id for Google Ads; value, currency and content_ids for Meta; the conversion value for LinkedIn; the revenue variable for Microsoft UET. A call without the confirm flag is refused by the server, so nothing is spent by accident.

Consent Mode v2 is worth its extra credit for any EU, EEA or UK traffic: it sets the consent defaults to denied before any tag fires and updates them after the banner, which Google requires for ads measurement there and which keeps Meta and LinkedIn tags from firing early. The free Consent Checker shows what your site does today, and Claude can run it for you with check_consent.

Step 5: push to Google Tag Manager

Push all three to the Production workspace of GTM-ABC1234.

Claude confirms the target and calls push_to_gtm for each generation. The conversion tags, triggers and variables land in the workspace as unpublished changes, with a link to the workspace. Open Preview, complete one real test conversion (a cheap product, a test lead), and check that every conversion tag fires exactly once on the confirmation step, with the value present. Then publish. Double-firing is the failure that costs most: a platform that sees two purchases per order bids as if your margins were double.

Step 6: verify in each platform

  • Google Ads: the conversion action moves from Unverified to Recording conversions, sometimes after a few hours. Google Tag Assistant shows the hit immediately.
  • Meta: Events Manager, Test Events, shows Purchase with its parameters within seconds.
  • LinkedIn: the Insight Tag shows as verified and the conversion rule shows activity after the first fire.
  • Microsoft Ads: the UET Tag Helper shows the goal and revenue on the confirmation page.

After launch: ask Claude how the conversions perform

With TC Pro monitoring on the site, the same connection answers "how many purchases did example.com record this week, and from which sources?" from live data, and "export the client report for last month as a PDF" returns a branded report link you can forward. The Claude guide shows those prompts.

What it costs

A paid TC Pro month for the MCP server (the trial excludes it), plus credits per conversion generated: usually 1 per platform and 1 more for Consent Mode v2. Scans, pushes, monitoring questions and reports are free. Keys are capped at 50 generations and 30 pushes a day and every call is logged, so a mistake is visible and bounded.

Where TrackingCoder fits

TrackingCoder knows how a purchase or a lead should be wired on each ad platform, with the right event names, parameters and triggers for your checkout, and places it in Google Tag Manager. Claude is the interface. Use it in the app with 5 free credits a month, or from Claude, Cursor, VS Code and Codex with TC Pro.

Skip the manual setup

TrackingCoder detects your CMS and plugins automatically, then generates ready-to-use tracking code. No more adapting generic tutorials - get code tailored to your exact setup in under 2 minutes.

Try TrackingCoder Free →

5 free credits every month. No card required.