Design Website Measurement Around the Decisions You Need to Make
Define events from real decisions, agree on triggers and values, test the full collection path, and maintain measurement when the website changes.
The Short Answer
Start with the business question and the customer action that can provide relevant evidence. Define each event's meaning, trigger, fields, owner and exclusions. Distinguish attempted actions from successful ones, use consistent product and transaction identifiers, and document monetary values.
Collect only approved context that serves the purpose. Test the complete path from the customer journey through destination processing to the report, including failures and repeated confirmation-page visits. Reconcile known transactions and explain expected collection limits without forcing all systems to agree. Maintain the event plan when features, integrations or consent behavior change so the meaning of historical and current reports remains clear.
Key takeaways
- An event needs a shared meaning and trigger, not just a name.
- Keep identifiers and monetary definitions consistent across the journey.
- Test successful actions, failures, repeated deliveries and final reports.
- Maintain collection purpose, consent behavior and definitions through website changes.
Collecting every click does not create a useful measurement system. It can create a large, inconsistent record that nobody trusts enough to use. The better starting point is the decision: what do you need to understand about the customer journey, and which observations would help?
An event is a recorded action or state change, such as selecting a product or completing a purchase. An event plan explains exactly when that record should exist, what information belongs with it, where it goes and how the team checks it.
The plan is a shared agreement between the business and the people implementing measurement. It should be readable by both. If only the developer understands it, the business cannot judge its meaning. If it contains only business aspirations, the developer cannot implement it reliably.
Work backward from a real business question
Start with a limited set of questions. Can suitable visitors choose the right product? Where does an order fail to progress? Are customers returning a particular option more often? Each question requires different evidence and may involve both website behavior and operating records.
For a fictional lamp brand, suppose the team wants to know whether customers understand the difference between two sizes. Page views alone will not answer that. The team may need to observe comparison use, size selection, cart contents and later size-related questions or returns.
Do not assume that a sequence of events explains the customer's reason. Someone can select a size confidently or by mistake. Use the data to identify where to investigate, then combine it with product and customer evidence.
The product-choice guide helps define the decision the interface should support. Measurement should describe that journey without pretending it can read the visitor's mind.
Define the moment that makes each event true
An event name is not enough. “Added to cart” might mean the person clicked the button, the request reached the server or the item was successfully added. Those moments are different. Choose the one the report needs and keep the distinction explicit.
Write a short contract for each important event: the business meaning, trigger, required fields, source, destination, owner and situations in which it must not fire. Record whether it represents an attempt, a successful action or a failure.
Here is an illustrative plan for the lamp decision. These are business descriptions; the implementation should map them to the destination's appropriate standard events or documented custom events.
| Observation | Trigger to define | Context needed |
|---|---|---|
| Product comparison used | The comparison becomes meaningfully visible or is intentionally opened | Compared product identifiers and page context |
| Size selected | The selected option actually changes | Product and variant identifiers |
| Cart addition succeeds | The cart confirms the requested addition | Variant, quantity and relevant value fields |
| Purchase recorded | The agreed order-completion condition occurs | Stable transaction reference, currency and items |
| Refund recorded | The relevant refund is confirmed | Original transaction reference and affected items |
Avoid creating a different meaning for the same name on different pages. If a mobile selector and desktop selector behave differently, the measurement still needs to represent the same customer action or clearly describe the difference.
Use consistent identifiers and value definitions
Product names can change. A reliable product or variant identifier helps connect observations to the same item across the website, order system and reports. Record which system owns the identifier and how variants differ from parent products.
For purchases, define the transaction reference and ensure that a repeated delivery of the same logical purchase can be recognized. Do not generate a new order reference whenever the confirmation page reloads. If several systems send the event, assign responsibility and verify the destination's supported duplicate-handling behavior.
Define monetary values as carefully as identifiers. State whether the event's value includes shipping, tax or discounts, and send the appropriate currency. A field containing a formatted price string is not necessarily equivalent to a numeric amount expected by an analytics destination.
Google Analytics' ecommerce measurement documentation describes standard purchase and refund events with transaction and item information. Use the current field requirements for that destination instead of inventing a near-equivalent event that loses useful reporting behavior.
Keep an order-level total separate from item-level amounts. Repeating the whole order value on every product row will inflate a product report when the rows are added together.
Collect only context that has a defined purpose
It is tempting to attach the full customer record to every event because it may be useful later. That increases exposure and often makes the data harder to govern. Choose the fields needed for the stated decision and approved destination.
For a size-selection question, product, variant and page context may be enough. The customer's email, address or free-text support message should not be included merely because the application already has it.
Google's Analytics PII guidance prohibits sending information Google could use or recognize as personally identifiable information. Check URLs, titles, search terms, campaign fields and custom properties as well as obvious form fields. Data can leak through context the team did not intend to track.
Follow the site's approved consent and privacy configuration, and verify the actual behavior when choices change. Do not bypass a visitor's choice by moving the same collection to a server and calling it a technical improvement. Server-side delivery changes the route; it does not, by itself, settle what the business is allowed to collect or send.
Document the intended behavior for anonymous, signed-in, consented and restricted states relevant to the site. Do not fill missing identities by guessing that separate people are the same customer.
Test the complete event path before trusting the report
Seeing a message in a browser console is only the first check. Confirm the trigger, payload, destination receipt, processing and report where the business will use it. A correctly sent field may still need an appropriate reporting configuration.
Use known test cases and write down the expected records. For the lamp example, choose a product, change size, add two units, remove one and complete an approved test order. Verify the final product, quantity, value and transaction reference. Test a repeated confirmation-page visit and the supported refund path.
Include realistic failures. An unsuccessful cart request should not count as a successful addition. A declined payment should not become a completed purchase merely because the customer clicked “pay.” Check the site's actual order states rather than assuming every checkout implementation behaves the same way.
Test relevant consent states, devices and navigation paths. Some events may fire on a normal page load but fail when content changes without a full reload. Others may be duplicated because both a plugin and custom code listen to the same action.
The website reliability guide offers a wider release process. Measurement checks should accompany customer-journey checks because a visible feature and its event can fail independently.
Reconcile what should match and explain what should not
Choose a small known set of test transactions to compare exactly. Then inspect a realistic reporting period using consistent dates, currency, purchase state and exclusions. This can reveal missing values or duplicate events before the team interprets performance.
Do not demand that every analytics total equal the order system. Browser restrictions, consent choices, processing delays and different report definitions can create legitimate differences. The task is to distinguish expected limits from implementation defects.
For each gap, record the size, affected scope, likely explanation and the check that supports it. “Analytics is always inaccurate” is not a diagnosis. Neither is changing the order total to match the dashboard.
Use the website metrics guide to connect the reconciled data to a decision. A carefully defined measure with a known limitation is more useful than a precise-looking total with no shared meaning.
Maintain the plan when the website changes
Give the event plan an owner and version. A new checkout, product selector, consent setup, analytics integration or cart behavior should trigger a review of the affected events. A renamed field can break a report even when the storefront still works.
Record changes before release and preserve the historical definitions. If “purchase” changes from order creation to confirmed payment, a comparison across that date needs an explanation. Do not silently rewrite the meaning of the past.
Monitor a few practical quality signals: sudden missing purchase values, unfamiliar currencies, unusual duplicate rates or a complete drop in a normally active event. Investigate the underlying journey and collection route before assuming customer behavior changed overnight.
Remove measurements that no longer serve a purpose through a planned change. Check dependent reports and destinations first. A smaller, understood event set is easier to keep reliable than a permanent collection of experiments nobody owns.
Questions about event planning
Should we track every button click?
No. Start with actions that help answer a defined customer or business question. Add detail when it supports an investigation. Unused events increase maintenance and can create unnecessary data exposure without making decisions better.
Does server-side tracking solve all missing data?
No. It can change how certain records are delivered, but identifiers, consent behavior, event definitions, duplicate handling and destination requirements still matter. Evaluate the actual problem before choosing an implementation and document the limits that remain.
Can we trust a purchase event once it appears in the testing tool?
Not yet. Verify the trigger, values, identifiers, destination and final report, including repeated visits and relevant failure cases. Then reconcile known test transactions and document expected differences from the order system before using the measure for decisions.
Explore the analytics and measurement guides for related reporting and attribution work.
Sources
Still have a question?Ask the DTCUP Community ↗

