V
VedantVerse
Tracking & Analytics•7 min read•2026-11-06

GA4 + GTM Setup Guide for Performance Marketers

A definitive, zero-fluff manual on configuring Google Tag Manager and GA4 for accurate e-commerce purchase tracking, custom dimensions, and cross-domain measurement.

Vedant Tiwari
Vedant Tiwari
Performance Marketing Executive
GA4 + GTM Setup Guide for Performance Marketers

By Vedant Tiwari, Senior Performance Marketer & Media Planner, Mumbai · Updated 26 November 2026 · 10 min read

Short answer: Google Analytics 4 (GA4) paired with Google Tag Manager (GTM) serves as the impartial source of truth for your paid media spend. By building a clean DataLayer architecture, implementing cross-domain tracking, and deduplicating transaction events, performance marketers eliminate reporting discrepancies between Meta Ads, Google Ads, and actual bank revenue.

Key takeaways

  • Never rely solely on ad platform dashboards; Meta and Google Ads both claim credit for the same conversion.
  • GA4 is event-based, not session-based; standardizing event parameter naming across all web assets is mandatory.
  • Cross-domain measurement must be configured in GA4 data streams to prevent checkout subdomains from breaking user attribution into "Direct" traffic.
  • BigQuery export in GA4 gives you un-sampled, raw event logs for advanced cohort and customer lifetime value (LTV) analysis.
  • Consistent UTM taxonomies are the foundation of accurate first-touch and last-touch attribution modeling.

GA4 vs Universal Analytics at a glance

DimensionLegacy Universal Analytics (UA)Google Analytics 4 (GA4)Performance Advantage
Measurement ModelSessions and PageviewsFlexible Event + Parameter ModelTracks granular user interactions
Cross-Platform TrackingSeparate web and mobile propertiesUnified Data Streams (Web, iOS, Android)Single customer journey view
Attribution ModelingLast Non-Direct Click by defaultData-Driven Attribution (DDA)Credits multi-touch discovery across channels
IP AnonymizationRequired manual configurationAnonymized automaticallyBuilt for modern privacy compliance
Raw Data ExportRestricted to expensive UA 360Free native BigQuery exportEnables customized SQL attribution modeling

How to structure your GTM DataLayer architecture

Follow these three implementation rules:

1. Enforce standard ecommerce event schemas: Use Google's recommended event names: view_item, add_to_cart, begin_checkout, and purchase. Custom event names like bought_item prevent GA4 from populating native monetization reports.

2. Pass comprehensive item arrays: Every ecommerce event must pass item_id, item_name, price, quantity, item_category, and item_brand. This enables granular ROAS reporting by product SKU.

3. Configure cross-domain tracking: If your store checkout operates on a third-party domain (e.g. checkout.store.com or payment gateways), add those domains to GA4's "Configure your domains" list to preserve session continuity.

Standard Performance Marketing UTM Taxonomy Matrix

UTM ParameterConventionExample ValuePurpose
utm_sourcePlatform name (lowercase)meta, google, jiohotstarIdentifies the traffic source
utm_mediumChannel formatpaid_social, cpc, programmaticClassifies the channel type
utm_campaignCampaign Objective & Namecura_in_c01_signup_webMatches the ad platform campaign
utm_contentCreative variant & formatengineer_explains_reel_v2Isolates creative performance
utm_termAudience / Keyword targetblr_hyd_pros or keywordIdentifies the targeting cohort

Tracking comes before scale

Before spending ₹10L+ on paid ads, verify your GA4 and GTM health:

  1. Transaction Deduplication: Add JavaScript logic inside GTM to check whether transaction_id has already fired in localStorage, preventing accidental duplicate page refreshes from over-counting revenue.
  2. Internal Traffic Exclusion: Filter out IP addresses of your internal team and agency partners to prevent skewed conversion rates.
  3. Google Signals Activation: Enable Google Signals in GA4 Data Settings for cross-device reporting and demographic insights.
  4. Consent Mode v2 Implementation: Configure Advanced Consent Mode to maintain modeled conversions in compliance with global privacy regulations.

Real example: Cross-channel attribution audits

In audits across our client portfolio (including CURA, Cutistic, and Bellissima):

  • Identified that over 24% of conversions were being attributed to "Direct" due to unlinked payment gateway return URLs.
  • Configured referral exclusions and cross-domain tracking, restoring accurate channel attribution to Meta and Google Ads.
  • Reconciled ad platform spend against store revenue, identifying which ad sets drove incremental sales vs which were merely claiming existing brand searchers.

Read the client case study: CURA Attribution Framework.

Common mistakes that waste budget

  • Inconsistent UTM casing: Mixing utm_source=Meta and utm_source=meta splits your data into two separate rows in GA4.
  • Ignoring Data Retention settings: GA4 defaults event data retention to 2 months; manually change it to 14 months in Data Settings.
  • Failing to mark conversions: Creating custom events in GTM without marking them as key events / conversions in GA4 prevents them from being imported into Google Ads.
  • Relying on GA4 for real-time bid optimization: GA4 data processing can lag by 24 to 48 hours; use platform pixels for real-time bidding, and GA4 for macro attribution.

A simple 30-60-90 day plan

Days 1-30: Architecture cleanup. Implement GTM container with standardized DataLayer. Set up purchase and lead event schemas. Configure cross-domain tracking and referral exclusions.

Days 31-60: Attribution tuning. Enable BigQuery export. Establish UTM hygiene across all active campaigns. Compare first-touch vs data-driven attribution models in Advertising workspace.

Days 61-90: Conversion value optimization. Link GA4 key events to Google Ads. Set up custom exploration reports tracking cohort LTV and repurchase velocity.

Frequently asked questions

Why does GA4 report different revenue than Shopify?

GA4 may experience small discrepancies (typically 5-10%) due to ad blockers, missing consent, or cancelled orders. If the gap exceeds 15%, your GTM purchase tag is either misconfigured or dropping on mobile checkouts.

What is Data-Driven Attribution in GA4?

Data-Driven Attribution uses machine learning to evaluate all touchpoints in a conversion path, distributing credit based on how each touchpoint incrementally influenced the user's decision to convert.

How do I stop payment gateways from showing as referral traffic?

In GA4 Admin > Data Streams > Web > Configure tag settings > List unwanted referrals, add the domains of your payment gateways (e.g., razorpay.com, paytm.com, cashfree.com).

What is the maximum data retention period in GA4?

GA4 allows up to 14 months of user-level data retention for exploration reports (the default setting is only 2 months). Make sure to toggle this setting in your Admin panel.

Work with me

Need an enterprise-grade GA4, GTM, and attribution telemetry setup for your brand? I build clean data architectures that show exactly where your ad rupees convert. Get in touch.

About the author

Vedant Tiwari is a Senior Performance Marketing Executive and Media Planner based in Mumbai. He plans, runs and reports on paid media across Meta Ads and Google Ads, and writes about what works at VedantVerse.

Tags:GA4GTMTrackingE-commerce