How do you set up GA4 and conversion tracking for a D2C store?

A practical guide to setting up GA4 ecommerce tracking, Meta pixel and conversion events on a small D2C store so the numbers match real orders.

Anadoris Digital · · 4 min read

Google analytics phone
Photo: Edho Pratama / Unsplash (CC0)

Small D2C brands make big decisions on tracking data: which ads to scale, which influencers to rebook, which pages to fix. If the data is wrong, every decision built on it is shaky. A common pattern is a store where GA4 shows half the orders the platform shows, or the ad platform claims more purchases than actually happened.

Good tracking does not have to be complicated. It needs a clean setup, consistent campaign tagging and a regular check against real orders. Here is a practical approach.

Decide what you need to know

Before touching any code, write down the questions you want tracking to answer. For most small D2C brands, they are: Where do buyers come from? Which campaigns and creators bring profitable orders? Where do people drop off between product page and payment? Which products and pages convert best?

  • Traffic and orders by source, medium and campaign.
  • Funnel: product view, add to cart, begin checkout, purchase.
  • Revenue and order value by channel and campaign.
  • Conversion rate by device and landing page.
  • New versus returning customers.

Setting up GA4 ecommerce

Use your platform’s official or well-maintained integration rather than pasting code by hand. On Shopify, Google’s own channel app connects GA4; on WooCommerce, established plugins or Google Tag Manager handle it. The aim is to send the standard GA4 ecommerce events with item details, value and currency.

  • view_item on product pages, with product ID, name, price and variant.
  • add_to_cart when items are added.
  • begin_checkout when checkout starts.
  • add_payment_info and add_shipping_info if available.
  • purchase on order completion, with transaction ID, value, tax, shipping and currency INR.

Avoid running two setups at once, such as an app and manually added code, which often double-counts purchases. Check for duplicates by comparing GA4 transaction IDs with your orders.

Pay attention to the purchase event on the thank-you page. If buyers pay on an external gateway page and are redirected back, make sure they land on a page where the purchase event fires once. A refresh of the thank-you page should not send a second purchase. Testing both prepaid and COD orders confirms that each payment path is tracked.

Ad platform tracking

For Meta ads, install the pixel and the Conversions API, which sends events from the server and is less affected by browser restrictions. Most platforms offer an official integration that sets up both and deduplicates events. Do the same for Google Ads conversion tracking if you run Google campaigns.

Expect ad platforms and GA4 to report different numbers. They use different attribution rules and time windows. What matters is that each is set up correctly and that the trend is consistent with your real orders.

Ad platforms also need clean data to optimise. If purchase events are missing, duplicated or sent with the wrong value, the platform learns from bad signals and may find the wrong buyers. Sending accurate value and currency with each purchase, and passing hashed customer details through the Conversions API where consent allows, improves match quality.

UTM tagging discipline

UTM parameters on links tell GA4 where a visitor came from. Without them, traffic from Instagram bios, WhatsApp broadcasts, influencer links and emails often lands in “direct” or “referral”, which makes it impossible to judge those channels. Agree a simple naming convention, such as lowercase source and medium names, and keep a shared sheet of tagged links.

  • utm_source: where the link was placed, such as instagram, whatsapp or newsletter.
  • utm_medium: the type, such as paid_social, influencer, broadcast or email.
  • utm_campaign: the campaign name, consistent across links.
  • Never use UTM tags on internal links within your own site.

Tracking depends on consent and browser rules, and India’s data protection law expects clear notice about data collected. Make sure your privacy policy explains analytics and advertising tracking, and handle consent appropriately.

Checking the data against reality

Every week for the first month, then monthly, compare GA4 purchases and revenue with your platform’s orders for the same period. They will not match exactly, because of consent, ad blockers and cancelled or COD orders, but large gaps point to a setup problem. Place a real test order after any theme or checkout change to confirm the purchase event still fires once, with the right value.

For COD-heavy brands, remember that a purchase event at checkout is not a delivered, paid order. For true channel profitability, combine tracking data with delivery and RTO outcomes from your order system.

Where to start

Audit what is installed today: list every tracking app, plugin and manual code snippet. Remove duplicates, install GA4 and the Meta integration through official routes, place a test order and confirm each event in GA4’s DebugView and Meta’s Events Manager. Then set up a UTM convention for all links you share. Anadoris Digital can audit your tracking if the numbers do not add up.

Related service: Websites & Commerce · More on this topic: Websites & Commerce articles

Common questions

Why does GA4 show fewer orders than my store?

Common reasons include visitors declining consent, ad blockers, purchase events not firing on some payment methods or thank-you page variants, and redirects through external payment pages. Some gap is normal. A large or growing gap usually means a setup problem worth investigating with a test order.

Do I need Google Tag Manager?

Not always. Official platform integrations cover standard ecommerce tracking for most small stores. Tag Manager helps when you need custom events, several marketing tags or more control without editing theme code. It adds flexibility but also complexity, so use it when you have a clear need.

Should COD orders be counted as purchases in tracking?

Ad platforms and GA4 usually record the order when it is placed. That is useful for optimisation, but it overstates revenue for brands with high RTO. Keep a separate report from your order system that shows delivered and paid revenue by channel.

Your next chapter

Let’s build what comes next.

A new website. A better system. A simpler way to work. Tell us where you want to begin.

Discuss your project