Why Choose Us
About UsClients & TestimonialsCareers
Services
Software DevelopmentWeb DevelopmentMobile App DevelopmentSaaS DevelopmentCloud ServicesQA & TestingUI/UX DesignDesign MarkupHire ResourcesCorporate TrainingDigital MarketingData & AnalyticsCloud Telephony
Solutions
AI & ML SolutionsAI Marketing SolutionsCRM Sales AutomationCybersecurity & CloudStartup SolutionsTechnology Services
Industries
HealthcareEducationBFSISaaSManufacturingE-commerceTravelEV SolutionsSupply ChainAgricultureEntertainment
Free Tools
AI Token CounterAI Cost CalculatorPassword Strength CheckerWebsite SEO AnalyzerMeta Tag GeneratorSchema Markup GeneratorAI Marketing ROI CalculatorUTM Link BuilderQR Code Generator
BlogContact Let's Talk

GA4 Setup for Indian eCommerce (2026): Step-by-Step Configuration, Enhanced E-Commerce + DPDP-Compliant Consent

If you run an Indian eCommerce business and your GA4 reports look like noise - missing transactions, duplicate purchases, ₹ amounts that don't match your backend, "(not set)" appearing everywhere — you likely have GA4 setup problems. The good news: the most common issues are also the most fixable. In our experience auditing GA4 implementations for Indian D2C and eCommerce brands, a recurring pattern emerges - many setups are missing critical configuration that costs them attribution accuracy and reporting reliability.

This is a practical 2026 guide to GA4 setup for Indian eCommerce. It covers the configuration sequence from GTM container to Enhanced Ecommerce to Consent Mode V2 (DPDP-aware), platform-specific implementation for Shopify and WooCommerce with copy-paste code, the core ecommerce events you should track, a Looker Studio dashboard outline, and the debugging workflow for when things go wrong.

Why GA4 Is Often Broken for Indian eCommerce Sites

The four most common issues we see:

  1. No Enhanced Ecommerce events: basic GA4 captures page views and sessions but misses the actual product interaction data (view_item, add_to_cart, purchase) that powers ecommerce reporting.

  2. No server-side tracking: client-side tracking can miss a meaningful share of conversions due to ad-blockers, browser privacy features, and tracking-prevention policies. Server-side tracking can recover some of this.

  3. No consent mode V2: for privacy-aware setups, consent gating matters. Without it, you can lose tracking entirely on users who don't consent.

  4. Wrong currency configuration: ₹ amounts showing up as raw numbers without proper currency configuration in reports.

Fixing these four typically improves your GA4 data quality substantially.

Setup Prerequisites

Before any code, get these in place:

  • Google Tag Manager (GTM) container on the site — for event management

  • GA4 property with INR as base currency

  • Consent management platform — for DPDP-aware consent gating

  • Server-side GTM environment (Cloud Run on GCP, or alternative) — for higher-quality data

  • Google Search Console + GA4 linkage — for organic traffic enrichment

DPDP-Aware Consent Mode V2

As a general principle, you should collect user consent before storing non-essential cookies for analytics or marketing. Consent Mode V2 lets you collect anonymous aggregate signals when consent is denied — so you maintain some visibility without storing identifiable data.

Note: this guidance is general. India's Digital Personal Data Protection (DPDP) Act, 2023 and its accompanying Rules govern how personal data may be processed. Verify the specific obligations that apply to your business — including the precise consent and notice requirements — against the DPDP Act 2023 and its Rules, and seek qualified legal advice for your situation.

Implementation sequence:

  1. Install a CMP (consent management platform)

  2. Configure the CMP to fire google_consent_mode signals

  3. Update GA4 to operate in consent-aware mode

  4. Verify in GA4 DebugView that signals fire correctly

Sample consent mode initialisation (before GTM loads):

<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

// Default state: denied (before consent)
gtag('consent', 'default', {
  'ad_storage': 'denied',
  'analytics_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied',
  'wait_for_update': 500
});
</script>

When the user accepts consent, fire:

gtag('consent', 'update', {
  'ad_storage': 'granted',
  'analytics_storage': 'granted',
  'ad_user_data': 'granted',
  'ad_personalization': 'granted'
});

Enhanced Ecommerce — The Core Events to Track

GA4 ecommerce reporting depends on these specific event names. Custom names break the standard reports.

  1. view_item: when user views product detail page

  2. view_item_list: when user views category/listing page

  3. select_item: when user clicks a product in a list

  4. add_to_cart: when product added to cart

  5. remove_from_cart: when product removed from cart

  6. view_cart: when cart page viewed

  7. begin_checkout: when user enters checkout flow

  8. add_shipping_info: when user enters shipping address

  9. add_payment_info: when user enters payment details

  10. purchase: when order is completed (the most important)

Each event has required parameters. The purchase event template:

gtag('event', 'purchase', {
  'transaction_id': '12345',
  'value': 2499.00,
  'currency': 'INR',
  'tax': 374.85,
  'shipping': 0.00,
  'items': [
    {
      'item_id': 'SKU123',
      'item_name': 'Product Name',
      'item_brand': 'Your Brand',
      'item_category': 'Skincare',
      'price': 2499.00,
      'quantity': 1
    }
  ]
});

Platform-Specific Implementation

Shopify (theme.liquid + dataLayer)

For Shopify, the easiest path is the Google & YouTube channel app + manual dataLayer pushes for events the channel doesn't cover.

Add to theme.liquid for the purchase event (in the checkout/thank-you page Liquid template):

{% if first_time_accessed %}
<script>
  window.dataLayer = window.dataLayer || [];
  dataLayer.push({
    event: 'purchase',
    ecommerce: {
      transaction_id: '{{ checkout.order_number }}',
      value: {{ checkout.total_price | money_without_currency }},
      currency: 'INR',
      tax: {{ checkout.tax_price | money_without_currency }},
      shipping: {{ checkout.shipping_price | money_without_currency }},
      items: [
        {% for line_item in checkout.line_items %}
        {
          item_id: '{{ line_item.sku }}',
          item_name: '{{ line_item.product.title | escape }}',
          item_brand: '{{ line_item.vendor | escape }}',
          item_category: '{{ line_item.product.type | escape }}',
          price: {{ line_item.price | money_without_currency }},
          quantity: {{ line_item.quantity }}
        }{% unless forloop.last %},{% endunless %}
        {% endfor %}
      ]
    }
  });
</script>
{% endif %}

Use similar dataLayer pushes for view_item, add_to_cart, and begin_checkout on their respective Liquid templates.

WooCommerce (Plugin or Custom)

For WooCommerce, install a quality GA4 plugin. A common choice: the GTM4WP plugin (free), or one of the WooCommerce GA4 integrations.

GTM4WP handles most events automatically. For custom needs, use hooks:

add_action( 'woocommerce_thankyou', function( $order_id ) {
    $order = wc_get_order( $order_id );
    $items = [];
    foreach ( $order->get_items() as $item ) {
        $product = $item->get_product();
        $items[] = [
            'item_id'   => $product->get_sku(),
            'item_name' => $product->get_name(),
            'price'     => $product->get_price(),
            'quantity'  => $item->get_quantity(),
        ];
    }

    $data = [
        'event'       => 'purchase',
        'ecommerce'   => [
            'transaction_id' => $order_id,
            'value'          => $order->get_total(),
            'currency'       => 'INR',
            'tax'            => $order->get_total_tax(),
            'shipping'       => $order->get_shipping_total(),
            'items'          => $items,
        ],
    ];

    echo '<script>window.dataLayer = window.dataLayer || [];';
    echo 'dataLayer.push(' . json_encode( $data ) . ');</script>';
});

Custom Build (Next.js / React)

For React, use a hook-based pattern. Example for purchase tracking:

function usePurchaseEvent(order) {
  useEffect(() => {
    if (window.gtag) {
      window.gtag('event', 'purchase', {
        transaction_id: order.id,
        value: order.total,
        currency: 'INR',
        items: order.items.map(item => ({
          item_id: item.sku,
          item_name: item.name,
          price: item.price,
          quantity: item.qty
        }))
      });
    }
  }, [order]);
}

UTM Integration With GA4

Your UTM tagging discipline feeds GA4 source/medium reports. Ensure your custom channel groups in GA4 align with your UTM convention.

Tip: GA4's default "Channel Grouping" may not capture your custom UTM values. Create custom Channel Groups (Admin → Data Display → Channel Groups) to capture your specific source/medium combinations.

GA4 Reports Worth Bookmarking

  1. Conversions by Source/Medium (Acquisition → Traffic Acquisition) — see which channels drive purchases, not just sessions

  2. Ecommerce purchases (Monetization → Ecommerce purchases) — revenue, AOV, items per transaction by date

  3. User journey (Engagement → Pages and screens with conversion overlay) — see actual paths to purchase

  4. Funnel exploration (Explore → Funnel exploration) — set up a checkout funnel to spot drop-offs

  5. Cohort exploration (Explore → Cohort exploration) — retention by acquisition cohort

Looker Studio Dashboard Template

Build once, use repeatedly. Suggested dashboard pages:

Page

What It Shows

Daily Pulse

Yesterday's revenue, sessions, conversion rate vs trailing 14-day average

Channel Performance

Revenue + AOV + CAC (if cost data integrated) by source/medium

Product Performance

Top-selling products, viewed-not-purchased, return rate

Funnel

Checkout funnel drop-off rates

Customer Cohorts

Repeat purchase rate by month-of-first-purchase

Campaign-Level

UTM campaign performance with attribution

The effort to build a dashboard like this varies with your familiarity with Looker Studio and the number of data sources involved.

Server-Side GTM — When to Invest

Server-side GTM moves event tracking from the user's browser to your server. Benefits:

  • Can recover conversion data lost to ad-blockers and browser privacy features

  • Better data quality and control

  • First-party tracking that is more resilient to third-party cookie changes

  • Potentially faster page loads (less client-side script)

Indicative costs vary by provider and traffic volume — expect a one-time setup effort plus an ongoing monthly hosting cost (for example, Cloud Run). Treat any figures as rough approximations and get a current quote for your situation. Server-side GTM tends to make most sense for higher-volume stores where the data-quality gains justify the added complexity and cost.

Common GA4 Setup Mistakes

  1. Duplicate purchase events: the same purchase fires twice (once from theme, once from a GA4 plugin). Audit for this.

  2. Currency not formatted as a number: pass numeric values, not "₹2499" strings.

  3. Missing transaction_id: required for de-duplication. Use a unique order ID.

  4. Cross-domain not configured: users moving between subdomains treated as new visitors.

  5. Test data in production property: use a separate GA4 property for staging/test, not the same as production.

  6. Wrong timezone: set to Asia/Kolkata.

  7. Consent gating broken: events fire before consent is gathered.

Debugging — GA4 DebugView + Tag Assistant

A standard debugging workflow:

  1. Install the GA4 Tag Assistant browser extension: real-time event inspection

  2. Open GA4 DebugView (Admin → DebugView)

  3. Enable debug mode: add ?debug_mode=1 to the URL or set the debug parameter in GTM

  4. Walk through the user journey: view product, add to cart, checkout, purchase

  5. Verify each event fires with correct parameters

  6. Check transaction_id uniqueness across multiple test orders

Common debug findings: missing item_id, wrong currency, double-firing events, and parameter typos.

Frequently Asked Questions

Do I need GA4 if my Shopify admin shows me sales data?

Generally yes. Shopify shows you order data; GA4 shows you attribution, journey, and cohort data. They serve different purposes, and many stores use both.

Will GA4 work with DPDP compliance?

GA4 can be configured with consent mode V2 so that analytics behavior respects user consent. Consent mode is one part of a compliant setup, not the whole of it. Verify your specific obligations against the DPDP Act 2023 and its Rules, and consult a qualified legal advisor.

How much does GA4 cost?

GA4's standard tier is free and is sufficient for most Indian eCommerce volumes. GA4 360 (paid) is an enterprise option that generally makes sense only for very high-volume or large organizations.

Should I migrate from Universal Analytics to GA4 if I still use UA?

Universal Analytics stopped processing new data in 2023. If you are still relying on UA, you are on a deprecated platform — migrate to GA4.

Why don't my GA4 sales match my Shopify orders?

Some discrepancy is normal. It commonly comes from ad-blockers, browser privacy features, events that fired but failed to send, or duplicate events. Investigate each potential cause rather than assuming a single source.

How long does GA4 setup take?

It depends heavily on scope and your platform. A basic property and tagging setup is relatively quick; a full Enhanced Ecommerce + Consent Mode + server-side implementation is a larger project. Plan according to the events and platforms you need to cover.

The Bottom Line

GA4 done right is among the most valuable analytics tools available to Indian eCommerce — accurate attribution, cohort analysis, and funnel insights. GA4 done wrong is misleading noise that can drive bad decisions. The configuration sequence in this guide is designed to move you from "broken" to "production-grade" with focused work.

For most Indian eCommerce stores, the highest-leverage starting point is installing consent mode V2 and Enhanced Ecommerce events correctly — together they tend to deliver the biggest improvement in data quality.

For implementation help, our eCommerce solutions team works on this exact problem. For broader marketing context, see AI marketing for ecommerce and our SEO services. For UTM-tagged URL building, use our UTM builder. Or reach out via our contact page or call +91-8010010000.

Comments

Be the first to share your thoughts on this article.

Leave a Comment

Your email address will not be published. Comments are moderated before appearing.

Chat with us