The Google-side companion to how to connect Meta ads to Shopify using Claude. Same operator mindset, different ad network. Part of our AI workflows pillar.
The customer pain point
Google Ads on Shopify has more moving parts than Meta — gtag.js, GA4, Google Ads conversion tracking, Google Merchant Center, enhanced conversions. Most stores have 2 of 5 correctly set up and don't realize the other 3 are quietly losing money.
This post is the full wiring diagram + Claude prompts to verify and fix each layer.
Table of Contents
- The 5-Connection Stack
- Connection 1 — gtag.js
- Connection 2 — GA4 + Shopify
- Connection 3 — Google Ads Conversion Tracking
- Connection 4 — Google Merchant Center
- Connection 5 — Enhanced Conversions
- The Weekly Diagnostic Loop
Key Takeaways
| Connection | What it does | Where you set it up |
|---|---|---|
| gtag.js | Foundation tag that fires events to GA4 + Ads | Shopify theme OR GTM |
| GA4 + Shopify | Behavior + conversion data flows to GA4 | Shopify Settings → Customer events |
| Google Ads conversions | Tells Google "this click became a sale" | Google Ads → Tools → Conversions |
| Merchant Center | Product feed → Shopping ads + Performance Max | Google Merchant Center → Shopify app |
| Enhanced Conversions | Server-side hashed customer data → +5-10% match quality | Google Ads → conversion action settings |
Skip any one of these and you're flying blind. No Merchant Center = no Shopping ads. No Enhanced Conversions = under-reporting iOS users. No conversion tracking = no Smart Bidding (Google can't optimize what it can't see).
The 5-Connection Stack
- gtag.js — the foundation. Fires events to GA4 and Google Ads.
- GA4 + Shopify Customer Events — Shopify's native pipe to GA4.
- Google Ads conversion tracking — "this user converted, optimize for it."
- Google Merchant Center — your products as ad inventory.
- Enhanced Conversions — server-side customer data to fill iOS gaps.
Most stores get 1 + 2 right and stop. The compounding lift from 3+4+5 is where Google starts paying you back.
Connection 1 — gtag.js
Use the Google channel app for Shopify (Settings → Apps → Google & YouTube). It installs gtag and connects GA4 + Google Ads + Merchant Center in one go. Do NOT paste gtag code into your theme — the app handles theme upgrades and Shopify checkout properly.
Claude prompt to verify gtag is firing correctly:
Using a headless browser, load my Shopify store homepage and:
1. Check that the gtag script loads from googletagmanager.com
2. Check that it fires a 'config' event with my GA4 ID
3. Check that it fires a 'config' event with my Google Ads ID
4. Capture any console errors related to gtag
Then load a product page and verify view_item event fires.
Then add to cart and verify add_to_cart event fires.
Report any missing events or errors.
If you don't have a headless browser setup, manually use the Google Tag Assistant Chrome extension on your store. Should show GA4 + Google Ads + Merchant Center all green.
Connection 2 — GA4 + Shopify
Shopify has a native GA4 integration via Customer Events (Settings → Customer events → Add custom pixel → Google Analytics 4). This fires the full ecommerce event suite (view_item, add_to_cart, begin_checkout, purchase) with proper item-level data.
Common breakage: stores enable GA4 in Shopify but ALSO have gtag in their theme. Result: every purchase fires twice. Your GA4 revenue is double-counted.
Claude prompt to detect double-counting:
Using the Shopify connector and Google Analytics MCP:
1. Pull last 30 days of orders from Shopify (count + total revenue)
2. Pull last 30 days of purchase events from GA4 (count + total revenue)
3. Calculate the ratio
If GA4 reports >1.1× Shopify, you have double-counting somewhere.
Tell me likely sources:
- Native Shopify GA4 + manual gtag in theme
- GTM also pushing purchase events
- A Shopify app with its own GA4 integration
For each likely source, give me the verification step.
Connection 3 — Google Ads Conversion Tracking
The Google Ads conversion that matters: Purchase with the right value, currency, and order ID for deduplication.
Setup path:
- Google Ads → Tools → Conversions → New conversion → Website
- Conversion name: "Shopify Purchase"
- Value: "Use different values for each conversion" — pulls the actual order value from gtag
- Count: "Every" (one conversion per order, not per click)
- Click-through window: 30 days (default; adjust per your sales cycle)
- Attribution model: Data-driven (recommended once you have 300+ conversions/30d) or Last click
Claude prompt to audit your conversions:
Using the Google Ads MCP:
1. List all active conversion actions for account [your account ID]
2. For each, show: name, category, count setting, attribution model,
primary/secondary status, and last 30 days of conversions
Flag any that:
- Are marked Primary but have <50 conversions in 30 days (Smart
Bidding needs volume)
- Have duplicate categories (two "Purchase" actions = double-counting
in Ads Manager)
- Use "Click" attribution when "Data-driven" is available
Give me a fix list.
Connection 4 — Google Merchant Center
Without GMC, you can't run Shopping ads or Performance Max with shopping inventory. With GMC properly fed, your product catalog becomes inventory Google can shop on every relevant search.
Setup:
- Shopify → Apps → Google & YouTube → Connect Google Merchant Center
- Map Shopify product categories to Google product categories
- Submit feed → wait 24-72h for approval
- Fix any disapprovals (usually missing GTIN, broken images, or policy violations)
Claude prompt to audit your GMC feed:
Using the Merchant Center API for account [your GMC account ID]:
1. List all products in feed
2. Count by status: approved, disapproved, pending
3. For disapproved: group by reason (image quality, missing GTIN,
policy, price mismatch with landing page, out of stock)
4. Cross-reference disapproved SKUs against my top 50 revenue
products in Shopify
Tell me:
- The single biggest revenue exposure (highest-revenue Shopify SKU
that's disapproved in GMC)
- For each disapproval category, the specific fix
- Whether the fix is on my Shopify side or GMC side
Brief.
A common finding: Shopify variants without GTINs get auto-disapproved by Google. The fix: add gtin to each variant in Shopify, OR set identifier_exists: no if your products genuinely don't have GTINs (handmade, custom, etc.).
Connection 5 — Enhanced Conversions
The iOS/ad-blocker equivalent for Google. Sends server-side hashed customer data (email, phone, name) so Google can match the conversion even when client-side cookies fail.
Setup:
- Google Ads → Tools → Conversions → click your Purchase conversion
- Enhanced Conversions → ON
- Choose method: Google tag (easier) or API (more accurate)
- With Google tag method, Google auto-grabs user_data from checkout
Claude prompt to verify Enhanced Conversions:
Using the Google Ads MCP, pull the Enhanced Conversions report for
my Purchase conversion (last 30 days):
1. % of conversions enhanced (target: >70%)
2. Match rate by field (email, phone, address)
3. Estimated additional conversions reported from enhancement
If <70% enhanced, diagnose:
- Checkout doesn't pass user_data
- Hashing is wrong (Google expects SHA-256 lowercase email)
- Consent mode is blocking transmission
Give me the single fix.
For our application funnel, we fire Enhanced Conversions server-side from /api/applications after the form submit — mirrors how we do Meta CAPI. The pattern is the same: hash the email + phone, send via the Google Ads API alongside the click ID (gclid cookie).
The Weekly Diagnostic Loop
Same Monday cadence as the Meta loop:
Every Monday, using Google Ads MCP + Shopify connector + GA4 MCP:
1. Spend, clicks, CPC, conversions, conversion rate by campaign
(Google Ads, last 7d)
2. Orders + revenue from Shopify, filtered to gclid-attributed orders
3. GA4 purchase events with utm_source=google
4. Cross-reference: do Google's reported conversions match Shopify's
gclid orders? Gap >10% = attribution issue
Then:
- Top 3 campaigns to scale (ROAS > X, impression share growing,
CPC stable)
- Top 3 ad groups to kill (ROAS < Y, low quality score, declining)
- Single search query in the search-term report that's bleeding —
add as negative
Brief. 10 bullets. Ship by EOD.
Talk to Branva
We wire this 5-connection stack on paid-growth client stores as part of our managed operations. Book a free call and we'll run the audit prompts live during the call.
Frequently Asked Questions
Do I need both GA4 and Google Ads conversion tracking?
Yes. GA4 measures behavior across your site (sessions, funnels, content performance). Google Ads conversions tells Google's bidding algorithm what to optimize for. Same purchase, two separate purposes.
Can I skip Google Merchant Center if I'm not running Shopping ads?
You shouldn't. Performance Max — Google's flagship campaign type for ecommerce — requires a GMC feed even when it's not running "shopping" ads. Without GMC, pmax has nothing to display in shopping placements (the highest-converting ones).
What's the difference between gclid and wbraid?
gclid is the click ID for users who arrived on a web browser. wbraid is the iOS-equivalent click ID when Apple ATT prevents the user from being tracked across apps. Both need to be passed to your conversion event. Enhanced Conversions handles both automatically.
How long until my Merchant Center feed approves?
24-72 hours for initial review. After approval, products re-validate on every feed update (Shopify auto-syncs every few hours). Disapprovals show up within a few hours of the violation.
Why is my Smart Bidding underperforming?
Most common cause: <300 conversions per 30 days. Smart Bidding needs that volume to learn. If you're below threshold, run on Maximize Clicks until you cross it, then switch to Maximize Conversions or Target ROAS.
Related reading
- How Do I Connect Meta Ads to Shopify Using Claude? — same pattern, Meta side.
- How Do I Connect Claude to the Meta Ads CLI? — connection prerequisite for the Meta side.
- How Do I Use the Shopify Connector in Claude? — the Shopify-side ops.
- Ecommerce Analytics: The 7 KPIs That Actually Move Revenue — the metrics framework behind these loops.
- The AI Workflows pillar — every workflow we run.