Analytics and Monitoring
Keep learning about how people use your product separate from checking that it works. Collect as little data as you can, and give every alert an owner and a response.
Content date: October 15, 2026.
Plain English
Product analytics asks whether people use a workflow and finish it. Monitoring asks whether the service is working and where it fails. Metrics are counts and measurements over time. Logs are records of events. Traces follow one request through the parts of a system. Collect the least data that answers your question, and never log every input. A dashboard with no owner and no response plan can show a failure without helping anyone fix it.
Use this when
Do this before other people depend on the service and before you add tracking code. Do it again when a new feature changes what an event, alert, or success measure means.
If you are just starting
Define a few events around meaningful outcomes, such as "inquiry accepted" and "inquiry failed." Leave out message text, email addresses, tokens, and raw query strings. Separate someone clicking Submit from a confirmed successful result. In the local practice, optional product events switch off when a policy flag is off, and the allowed fields are listed explicitly. That models a policy only. It does not settle which consent rules or legal basis apply to a real site.
When your project grows
Agree with the people responsible on why you collect data, who can see it, how long you keep it, and how it is deleted. Where privacy rules require consent (the EU's rules are a common example), decide how it works and ask a qualified advisor about your situation. Then test what the tracking code and network requests really do before and after a visitor makes a choice. A banner that changes appearance proves nothing. Use a small set of labels on your metrics, not user IDs or full web addresses. When you read results, allow for missing, late, and duplicate data and for biased samples. Alert only on meaningful impact, and give each alert an owner, written steps for responding, and a signal that things have recovered. Test the notification path in an environment where you are allowed to.
Worked example
A dental office's website records twenty Submit clicks on its appointment-request form but only twelve accepted requests. The product report must say twelve requests, not twenty. The operations view looks separately at why eight were rejected or failed. Neither view needs the patient's message or email address in its event data.
Practice
Design a minimal event and alert contract
- Run the local practice tests for switching events on and off and for dropping untrusted fields.
- Map one workflow of your own from intent to accepted, completed, failed, and unknown, as they apply.
- Write an event dictionary giving each event's purpose, allowed fields, owner, how long it is kept, and the collection policy.
- Draft one actionable alert and test its decision on the workbook's made-up healthy, failing, and no-data cases.
- List the real tracking-script, network, notification, duplicate-handling, access, and consent checks that the local functions do not prove.
Deliverable: A minimal event dictionary, your local test results, and one alert with a response plan, with the real-deployment checks you have not done listed.
Common mistakes to watch for
- A contact form's full message text, or a password, ends up in the tracking data.
- Twenty Submit clicks are reported as twenty completed customer inquiries.
- A visitor rejects tracking and the banner disappears, but the tracking script keeps sending data.
- Every user or web address becomes its own metric label, which makes the dashboard unusable and expensive.
- A quiet dashboard is read as "zero failures" when the data stopped arriving.
Prompting
A weak prompt
Track every click and every field value, and alert us on every error.
A better prompt
For [workflow, e.g. the contact form], list the product questions and the operations questions separately. Propose minimal events tied to confirmed outcomes, with their allowed fields, who can see them, how long they are kept, and what must never be sent. Test with made-up data that collection can be switched off and that private fields are excluded, then list which real tracking and network checks are still needed. For each alert, give the impact, the condition and time window, the owner, the response steps, and the signal that it recovered. Treat missing data as unknown, not healthy.
Collecting only what you need keeps visitors' data safe and your reports honest, and alerts with owners are the difference between noticing a failure and fixing it.
Check before you move on
- Product questions and operations questions are written separately.
- Each event is recorded only after the real outcome happened.
- Events carry only the fields they need.
- Collection was tested at the level you claim, not just in a local function.
- Missing data is treated as unknown.
- Every alert has an owner and a response.
You are done when
- The made-up payload cannot carry the private fields you supplied, and optional product events respect the policy flag.
- Your report does not treat local policy tests as proof of how a real tracking script behaves or as a legal compliance conclusion.
Questions to think about
A report shows twenty clicks on Submit and twelve accepted requests. How many requests can you say were accepted?
Twelve. Clicks show intent, and counting them as accepted or completed work would overstate what customers actually got.
Overnight your dashboard shows no requests at all. Is the error rate zero?
No. With no requests there is nothing to divide by, or the data may have stopped arriving. Call it unknown and check collection and real usage.
A local test shows your function drops analytics events when consent is off. Does that prove the live analytics script sends nothing before consent?
No. The test covers only your function. You still need to watch the live page's network requests before and after a visitor's choice.