Skip to main content
Google Ads

Google Tag Manager + Google Ads: The Right Setup (2026)

GTM is the cleanest way to manage Google Ads, GA4, and Pixel tags across your site. Here's the standard setup that gives you full attribution without breaking on every theme update.

Vince Servidad
Vince Servidad
Performance Marketing Consultant
11 min read
Share:

Google Tag Manager (GTM) is a layer that sits between your website and your tracking tags. Instead of editing your site every time you add a tag, you configure once in GTM and deploy.

For Google Ads + GA4 + Meta Pixel + Klaviyo, GTM keeps everything organized. Done right, you can swap tags, update events, and debug — all without touching your site code.

TL;DR

  • Install GTM container in site ``.
  • Configure dataLayer for ecommerce events.
  • Add Google Ads conversion tracking via GTM template.
  • Add GA4 configuration tag.
  • Add Meta Pixel via GTM (for non-Shopify sites).
  • Test in GTM Preview mode.
  • Publish.
  • When to use GTM (and when not to)

    Use GTM when

  • Custom site (non-Shopify).
  • Multiple tracking platforms needed.
  • Frequent tag changes anticipated.
  • Complex tracking requirements.
  • Skip GTM when

  • Shopify with simple tracking needs (use Shopify's native channels).
  • Single tag only (just install gtag directly).
  • Small site with limited budget for setup time.
  • For most Shopify stores, native channels (Google, Facebook & Instagram, Pinterest) handle 80% of needs without GTM. Add GTM only for advanced custom tracking.

    Step 1: Create GTM container

    Go to tagmanager.google.com → Create Account → Create Container.

  • Container name: your domain.
  • Target platform: Web.
  • You'll get a snippet to install in your site's `` and ``.

    Step 2: Install on your site

    For Shopify

    In Shopify Admin → Online Store → Themes → Edit code → `theme.liquid`.

    Paste GTM `` snippet just inside ``. Paste `` snippet just after the opening `` tag.

    For custom sites

    Same — paste the snippets in your site's HTML.

    For Next.js or React sites

    Use `next/script` or similar. Place GTM tag with `afterInteractive` strategy.

    Step 3: Configure dataLayer

    GTM relies on the dataLayer — a JavaScript array that stores ecommerce events.

    For ecom events, push:

    ```js

    dataLayer.push({

    event: 'view_item',

    ecommerce: {

    items: [{

    item_id: 'SKU-123',

    item_name: 'Vanilla Hair Oil',

    price: 1290,

    currency: 'PHP'

    }]

    }

    });

    ```

    Standard ecom events:

  • `view_item` (product page view)
  • `add_to_cart`
  • `begin_checkout`
  • `add_payment_info`
  • `purchase`
  • For Shopify with GTM: use a third-party app (like Analyzify) or custom Liquid to push these dataLayer events. Shopify doesn't natively populate the GTM dataLayer.

    Step 4: Add Google Ads tags

    In GTM:

    Tag 1: Google Ads Conversion Linker

  • Type: Conversion Linker.
  • Trigger: All Pages.
  • This stores click IDs in cookies for cross-page conversion attribution.

    Tag 2: Google Ads Purchase Conversion

  • Type: Google Ads Conversion Tracking.
  • Conversion ID: from Google Ads.
  • Conversion Label: from Google Ads.
  • Conversion Value: `{{DLV - ecommerce.value}}` (data layer variable).
  • Currency: PHP.
  • Transaction ID: `{{DLV - ecommerce.transaction_id}}`.
  • Trigger: `event = purchase`.
  • Tag 3: Google Ads Remarketing

  • Type: Google Ads Remarketing.
  • Conversion ID: from Google Ads.
  • Trigger: All Pages.
  • This populates your Google Ads remarketing audiences.

    Step 5: Add GA4 tags

    Tag 4: GA4 Configuration

  • Type: GA4 Configuration.
  • Measurement ID: from GA4 (G-XXXXXXX).
  • Trigger: All Pages.
  • Tag 5: GA4 Event — Purchase

  • Type: GA4 Event.
  • Configuration tag: GA4 Configuration tag (above).
  • Event name: `purchase`.
  • Parameters: pull from dataLayer (transaction_id, value, currency, items).
  • Trigger: `event = purchase`.
  • Repeat for `view_item`, `add_to_cart`, `begin_checkout`.

    Step 6: Add Meta Pixel via GTM (for non-Shopify)

    For Shopify, use the native Facebook & Instagram channel.

    For custom sites:

    Tag 6: Meta Pixel base code

  • Type: Custom HTML.
  • Paste Meta Pixel base code (from Events Manager).
  • Trigger: All Pages.
  • Tag 7: Meta Pixel Purchase event

  • Type: Custom HTML.
  • Paste `fbq('track', 'Purchase', {value: ..., currency: ...});`.
  • Trigger: `event = purchase`.
  • Repeat for ViewContent, AddToCart, etc.

    Step 7: Test in Preview mode

    In GTM, click "Preview." A new browser tab opens with Tag Assistant.

    Browse your site. Tag Assistant shows:

  • Which tags fire on each page.
  • Which triggers activate.
  • Variables and values being passed.
  • Verify each ecom event:

  • View Item: GA4 `view_item`, Meta `ViewContent`, no Google Ads conversion.
  • Add to Cart: GA4 `add_to_cart`, Meta `AddToCart`.
  • Purchase: GA4 `purchase`, Meta `Purchase`, Google Ads conversion.
  • Fix any errors.

    Step 8: Publish

    In GTM, click "Submit." Add a description (e.g., "Initial setup with Google Ads, GA4, Meta Pixel").

    Tags are now live on production.

    Common GTM mistakes

    1. Not configuring dataLayer first

    Without dataLayer events, your tags fire on no triggers. Make sure dataLayer pushes happen before adding tags.

    2. Hardcoding values

    Don't hardcode purchase values into your tags. Use dataLayer variables to pull from each transaction.

    3. Duplicate tags

    Adding Google Ads conversion via Shopify channel AND GTM. Now you double-count purchases.

    If using Shopify channel: don't also fire Google Ads conversion via GTM.

    4. No transaction_id

    Without it, refreshes on the thank-you page fire conversion multiple times. Use `transaction_id` to deduplicate.

    5. Not testing before publishing

    Always preview in GTM, verify each event, fix errors.

    Server-side GTM (advanced)

    For large sites or strict privacy requirements:

  • Server-side GTM moves tag firing to your server.
  • Reduces client-side JS load.
  • Better for performance and privacy compliance.
  • Setup is more complex (Cloud Run, Stape.io). Worth it for sites doing $50K+/month.

    GTM debugging tips

    Real-time testing

  • Use Preview mode + Tag Assistant.
  • Test each event individually.
  • Verify on mobile (different from desktop).
  • Production verification

  • After publish, use Tag Assistant on production site.
  • Cross-check Google Ads + GA4 + Pixel reports for the same event count (within 10–15%).
  • Common debugging fixes

  • Tag not firing? Check trigger condition.
  • Variable showing "undefined"? Check dataLayer push happened before tag fires.
  • Conversion firing twice? Look for double dataLayer pushes.
  • Maintenance

    GTM is set-and-forget mostly, but:

  • Audit quarterly: are all tags firing correctly?
  • Pause obsolete tags (don't delete in case you need to roll back).
  • Update tag versions when Google releases new templates.
  • Want help with GTM setup?

    GTM setup for ecom is multi-hour work. My Google Ads Specialist service includes GTM configuration. Or learn the system in the Google Ads Course Philippines.

    Related reading:

  • Google Ads Conversion Tracking: 2026 Guide
  • GA4 + Google Ads Integration
  • E-commerce Tracking Setup (GA4, GTM, Shopify)
  • Vince Servidad

    Written by Vince Servidad

    I've spent over $26M on ads and built my own 7-figure brand from scratch. I don't just 'manage ads'—I build the growth systems that actually scale businesses profitably.

    Want More Marketing Insights?

    Get weekly tips, strategies, and case studies delivered to your inbox.

    Need help with Google Ads?

    Get hands-on support from a performance marketing consultant based in the Philippines.

    Related Articles