Most ecommerce reporting problems start upstream, in events that were named differently on two pages, fired twice or never fired at all. A tracking plan prevents most of that by agreeing on what to collect before anyone writes code. This answer explains event tracking, what goes in a tracking plan, how to build one for an online store and how to check the data, based on Google Analytics and Segment documentation read on 21 November 2026.

What is event tracking?

Google Analytics defines it plainly: "An event allows you to measure a specific interaction or occurrence on your website or app." Every page view, product view, cart add and purchase can be an event. Each event can carry parameters (Segment calls them properties), such as the product ID, price or order value.

GA4 groups events into types. Some are collected automatically. Others you add yourself:

  • Recommended events: "Recommended events are events that you implement, but that have predefined names and parameters." Google says "These events unlock existing and future reporting capabilities."
  • Custom events: names you define yourself. Google's advice is to "only create custom events when no other events work for your use case", because "Custom events don't show up in most standard reports so you need to set up custom reports or explorations for meaningful analysis."
  • Key events: "A key event is an event that measures an action that's particularly important to the success of your business." Google adds that "Any event you collect can become a key event." For a store, the purchase is the obvious one.

What is a tracking plan?

Segment's documentation defines it: "A Tracking Plan is a data spec outlining the events and properties you intend to collect across your Segment Sources." Its best practices page adds that "A Tracking Plan clarifies what events to track, where those events live in the code base, and why those events are necessary from a business perspective."

The plan is a shared reference, not just an engineering file. Segment says "The Tracking Plan helps marketers, product managers, engineers, and analysts get on the same page." and notes that "Prior to Protocols, Tracking Plans typically lived in a spreadsheet." A spreadsheet is still a fine place to start. What matters, in Segment's words, is that "it represents a single source of truth for your data collection efforts."

How to build a tracking plan

  1. Write down the business goals. "Segment recommends documenting your high-level business objectives." For a store, these are usually revenue, new customers, repeat purchases and marketing efficiency.
  2. Work back from the metrics. Segment advises that "When building a Tracking Plan, it's best to start with the key metrics that drive value for your business." Then "Each user action maps to a distinct event, or Track call, that you will track in Segment."
  3. Keep the first version small. "Segment recommends starting with fewer events that are directly tied to one of your business objectives." It also observes that "Segment's most successful customers limit their Tracking Plan to a minimal number of core events with rich properties that provide context."
  4. Fix the naming rules. "Segment recommends Title Case for event names and snake_case for property names." It also says "Segment uses the Object (Blog Post) + Action (Read) framework for event names." So an event reads like Product Added or Order Completed.
  5. Put detail in properties, not names. In Segment's words, "events should be generic and high level, whereas properties are specific and detailed." Avoid names with dates or values in them. Segment warns against "creating events that pull a dynamic value into the event name (like User Signed Up (11-01-2019))."
  6. Describe every event and property. Segment notes that descriptions "are helpful for both engineers instrumenting Segment and consumers of the data."
  7. Map to each destination. GA4 has its own recommended event names, and ad platforms have theirs. Record the matching name for each tool next to your event so the same action is counted the same way everywhere.

An example ecommerce tracking plan

The table below is an invented starting plan for a DTC store, using Segment's Object plus Action naming. Segment's own example of an ecommerce company's main events lists Account Created, Product Added and Order Completed. The other rows and all properties are our recommendations.

EventFires whenKey propertiesBusiness question
Product ViewedA product page loadsproduct_id, variant_id, price, currencyWhich products attract interest but do not sell?
Product AddedA product is added to the cartproduct_id, variant_id, quantity, priceWhere do shoppers drop between viewing and adding?
Checkout StartedThe shopper reaches checkoutcart_value, item_count, currencyHow many carts reach checkout?
Order CompletedThe order is confirmedorder_id, revenue, discount, currency, productsRevenue, conversion rate and attribution
Account CreatedA customer account is createdsignup_methodHow many buyers create accounts?
Email Signed UpA visitor joins the email or SMS listform_location, consent_statusWhich forms grow the list?

We recommend sending order_id with every purchase event so duplicates can be removed and the order can be matched to your store's records. Our answer on UTM parameters and click IDs covers the campaign fields to keep with each session, and our guide to server-side tracking and the Meta Conversions API covers sending purchase events from your server.

How to test event tracking

  • Use GA4's DebugView. Google says it is "useful when you want to verify that you have set up an event and event parameters correctly."
  • Validate against the plan. In Segment Protocols, "Violations generate when an event doesn't match the spec'd event in the Tracking Plan." Names are matched exactly: "The event name strictly validates the name passed in your Track calls." and "Casing, spacing and spelling matter."
  • Know the limits. GA4 batches most events, "where each batch has up to 20 events." "Google Analytics has a 16 KB size limit on event data each time data is sent." And "Analytics ignores events that arrive more than 2 calendar days, plus today after the events were triggered."
  • Reconcile with orders. Compare the count of Order Completed events with orders in your store each week. A gap is the first sign that something broke. Our answer on why attribution numbers don't match explains other common gaps.

Keeping the plan current

A tracking plan decays unless someone owns it. Segment supports versions: "With Event Versioning, you can create multiple versions of an event definition, and validate events using a version key included in the Track event payload." Whatever tool you use, we recommend that changes to an event go through the plan first, then code, then a test. The same discipline applies to the tables your events land in, which our answer on data contracts covers.

Events become far more useful once they can be tied to known customers. Our answers on first-party data and identity resolution explain how. Brand Media Works designs tracking plans and builds the event pipelines behind them for ecommerce brands as part of its marketing data engineering work.

Frequently asked questions

What is the difference between event tracking and a tracking plan?

Event tracking is the code that records actions. A tracking plan is the document that says which actions to record, what to call them, what details to include and why.

What should an ecommerce tracking plan include first?

The purchase, the steps before it (product viewed, product added, checkout started) and sign-ups. Segment recommends starting with fewer events tied to business objectives and adding more later.

Should event names use snake_case or Title Case?

Pick one and enforce it everywhere. Segment recommends Title Case for event names and snake_case for property names. GA4 has its own recommended event names, so keep a mapping from your names to them if you send data to both.

When should I use custom events in GA4?

Only when no recommended event fits. Google notes that custom events do not appear in most standard reports, so you will need custom reports or explorations to analyze them.

Where should a tracking plan live?

Anywhere the whole team can read and that is treated as the single source of truth. A spreadsheet works to start. Segment notes that tracking plans typically lived in spreadsheets before it built its Protocols product, which validates live events against the plan.

Facts from the Brand Media Works competitor register, as published by each source on the date shown. Google Analytics and Segment features are as described in their own documentation. The example tracking plan, the destination mapping step, the reconciliation check and the change process are Brand Media Works recommendations. Brand Media Works does not publish its own fees.

Sources cited

  1. Google Analytics Help (support.google.com), About events, read 21 November 2026.
  2. Twilio Segment docs (twilio.com), Data Collection Best Practices, updated 25 March 2026, read 21 November 2026.
  3. Twilio Segment docs (twilio.com), Protocols Tracking Plan, read 21 November 2026.