GA4 and GTM for a Small Ecommerce Site: The Minimum Viable Setup

Analytics setups have a way of growing into a mess. For a small site, I prefer a short list of events that answer real questions, set up carefully and tested.

Start with the questions

What brings people to the site? What do they look at? Where do they enquire or buy? Each question maps to a small set of events. If an event does not help answer a question you actually have, skip it.

The short list

  • Traffic sources and page views come built in with GA4.
  • view_item for product pages.
  • add_to_cart, begin_checkout and purchase if you sell online.
  • generate_lead for enquiries: WhatsApp clicks, call taps and form submissions.

Setting it up in GTM

Use Google Tag Manager so you are not editing site code every time something changes. Push events into the data layer, fire GA4 event tags from triggers, and give every event consistent parameter names. For WhatsApp clicks, a click trigger that matches links to wa.me or api.whatsapp.com is enough to start.

Mark the events that matter

In GA4, the events you care about most can be marked as key events (these used to be called conversions). Keep that list short. If everything is a key event, nothing is.

Test before you trust

  • Use GTM preview mode and GA4 DebugView and click through the real journey.
  • Confirm each event fires once, not twice.
  • Check parameters such as item name, price and currency.
  • Exclude your own traffic, or the numbers will flatter you.

A tracking setup you have not tested is a guess. Ten minutes in DebugView will tell you more than hours of looking at reports later.

A naming convention

Use GA4’s recommended event names wherever one fits, and lower case with underscores for anything custom. Keep parameter names consistent, so item_name always means the same thing. Messy names are the main reason reports become hard to read a year later.

What a data layer push looks like

For a product page, the site sends an event with the item details and GTM passes it to GA4:

dataLayer.push({
  event: 'view_item',
  ecommerce: {
    currency: 'INR',
    value: 45000,
    items: [{ item_id: 'SKU123', item_name: 'Example sofa', price: 45000 }]
  }
});

The values here are placeholders. Your site, theme or ecommerce plugin usually has a way to output these automatically, so check that before writing it by hand.

Do not double count

GA4’s enhanced measurement already records page views, scrolls, outbound clicks and some form interactions. If you add your own tags for the same things, you can count them twice. Review what is already switched on before adding anything.

Settings to check early

  • Extend data retention for event data to the longest option offered.
  • Filter out internal traffic with your own IP address or device.
  • Link GA4 to Google Ads and Search Console if you use them.
  • Check that currency and time zone are correct for the property.

A few reports worth building

  • Traffic source against enquiries.
  • Product views against enquiry or purchase events.
  • Landing pages by key events.

These three answer most of the questions a small business owner asks.

A routine for keeping it healthy

Once a quarter, open DebugView, click through the main journeys and confirm every event still fires. Themes, plugins and redesigns break tracking quietly. A short routine check finds that before a month of data goes missing.