Skip to content
Bugwise
Menu
Tutorials

Testing Analytics and Tracking Events

Test the invisible part of an app, the analytics events that product decisions are built on. Read a tracking plan, see events with debug views, proxies and DevTools, check names, properties, timing and duplicates, respect consent and keep personal data out.

intermediate Mobile & web
Short on time? Switch to the quick version.

Two weeks after QuickBite redesigned its checkout, the product team celebrates: add-to-cart is up 100%. Marketing doubles its budget for the campaign that “worked”. A month later, a tester notices that every tap on Add sends the add_to_cart event twice. Nothing changed in how people shop. The numbers were wrong, and so was every decision made from them.

Analytics bugs are invisible to users. The app works, nothing crashes, the screen looks right. But product owners, designers and marketing decide what to build, keep or remove based on these numbers, and A/B tests pick winners with them. A tester who checks the events protects those decisions. This lesson shows how.

Part Not started

What app analytics is

Most apps and websites report what users do to an analytics tool such as Google Analytics, Firebase, Mixpanel, Amplitude or Segment. They do it with eventsAnalytics eventA record an app sends to an analytics tool when something happens, like search or purchase, with properties that describe it.Open in glossary →:

  • An event is something that happened: search, add_to_cart, purchase.
  • Properties (also called parameters) describe it: search_term: "ramen", price: 13.5, currency: "EUR".
  • User properties describe the user: plan (free or Premium), app language, country.
  • Screen or page views record where the user is.

From these, the team builds dashboards and a funnelFunnelThe steps users go through toward a goal, with how many make it from each step to the next.Open in glossary →: how many users searched, opened a restaurant, added a dish, started checkout and paid. Where the funnel drops, the team looks for a problem to fix.

Why testers should care: analytics bugs don’t hurt users directly, but they mislead everyone who reads the numbers. A missing event looks like a feature nobody uses. A duplicate looks like a success. A wrong value inflates revenue. And personal data in events is a privacy problem, not just a data problem.

Why testers should care

Analytics bugWhat the team concludes
add_to_cart sent twice“The redesign doubled add-to-cart!”
purchase not sent on iOS“iPhone users don’t buy. Let’s stop marketing to them.”
search_term missing“Nobody searches for anything specific.”
purchase value in cents“Revenue is up 100×.” (Usually spotted fast, but not always.)
Events sent before consentNothing, until a privacy complaint or a fine

In an A/B testA/B testAn experiment where users are split into groups that see different versions, to measure which works better.Open in glossary →, broken tracking in one variant is even worse: the team ships the losing design because the winning one didn’t count its successes.

Who owns analytics?

Usually a mix: a product analyst or product owner decides what to measure, developers add the code, and a data team builds the dashboards. Testing it often falls between the chairs. If nobody owns it, propose that tracking checks become part of each story’s Definition of DoneDefinition of DoneThe team-wide checklist every story must meet before it counts as finished.Open in glossary →.

Check this part

  1. What is an analytics event?

  2. Why do analytics bugs matter if users never see them?

Apps send events with properties to an analytics tool; teams build funnels, dashboards and experiments on them, so broken events lead to wrong decisions.

Part Not started

The tracking plan: your spec

Good teams write down every event in a tracking planTracking planThe spec for analytics: every event's name, when it fires, and its properties with types and allowed values.Open in glossary →: a table that says what each event is called, exactly when it fires, and which properties it carries. For a tester, it’s a requirement like any other.

EventFires whenProperties
searchThe user submits a searchsearch_term (text), results (number)
view_restaurantA restaurant page opensrestaurant_id (text), source: home | search | deep_link
add_to_cartA dish is added to the cartitem_id (text), price (number, euros), quantity (number)
purchaseA payment succeededorder_id (text), value (number, euros), currency (EUR)

What to check for each event:

  • Name: exactly as written. add_to_cart, AddToCart and add_to_Cart are three different events to the analytics tool.
  • Trigger: it fires at the right moment, once, and not in other situations. “Payment succeeded” is not the same as “Pay was tapped”.
  • Properties: all present, correctly named, with the right type (a number, not the text "13.50") and an allowed value (deep_link, not link).
  • Units and formats: euros or cents? EUR or €? Dates in which time zone?
  • Platforms: the same event behaves the same way on iOS, Android and the web.

No tracking plan? Ask for one, or start one from what the dashboards use. Testing events without a spec only finds the obvious bugs.

No tracking plan?

Many teams don’t have one, or it’s years out of date. You can still test:

  1. Ask the product owner or analyst which dashboards and funnels matter most. Those events are your priority.
  2. Look at the events the app sends today (next part) and write down what you see.
  3. Review that list with the analyst. Questions like “should purchase fire for a declined card?” often reveal that nobody had decided.

The result is a first tracking plan, which is one of the most useful documents a tester can start.

Try it: check the events

📋 Check the events against the plan

You captured six events while testing QuickBite. Does each one match the tracking plan?

EventWhenProperties
searchUser submits a searchsearch_term (text), results (number)
view_restaurantRestaurant page opensrestaurant_id (text), source: home | search | deep_link
add_to_cartDish added to the cartitem_id (text), price (number, euros), quantity (number)
purchasePayment succeededorder_id (text), value (number, euros), currency (EUR)
  1. 1. Searched for “ramen”

    search { search_term: "ramen", results: 7 }

  2. 2. Opened Noodle Bar from the search results

    view_restaurant { restaurant_id: "r_204", source: "results" }

  3. 3. Added Tonkotsu ramen

    AddToCart { item_id: "d_88", price: 13.5, quantity: 1 }

  4. 4. Added a second ramen

    add_to_cart { item_id: "d_88", price: "13.50", quantity: 1 }

  5. 5. Opened Pizza Uno from a link in an email

    view_restaurant { restaurant_id: "r_117", source: "deep_link" }

  6. 6. Paid for the order

    purchase { order_id: "o_48213", value: 27, customer_email: "anna@example.com" }

0 of 6 marked

Check this part

  1. The plan says add_to_cart. The app sends AddToCart. Is it a problem?

  2. The price property arrives as the text "13.50" instead of the number 13.5. Why does it matter?

The tracking plan is the spec for analytics: event names, when they fire, properties with types and allowed values; test events against it like any requirement.

Part Not started

How to see the events

You can’t test what you can’t see. There are four common ways to watch events while you use the app:

ToolHowGood for
Debug view of the analytics toolFirebase DebugView, DebugView in GA4 (Google Analytics 4), Mixpanel or Amplitude live viewsSeeing events exactly as the tool receives them, with properties
ProxyProxy toolA program that sits between the app and the server so you can watch and change network traffic.Open in glossary →Charles or Proxyman between the phone and the internetSeeing the raw requests from mobile apps. See Proxy Tools
Browser DevToolsNetwork tab, filtered by the analytics domain (for Google Analytics, collect)Websites: what is sent, when, and whether anything is sent before consent. See DevTools for Testers
Device loglogcatLogcatAndroid's system log, read with adb logcat, where apps write errors and crash details.Open in glossary → on Android or the Console app on a Mac, if the analytics library logs in debug buildsQuick checks without extra tools. See Mobile Logs and Crash Reports
Dev note: Turning on debug mode

Firebase on Android: adb shell setprop debug.firebase.analytics.app com.quickbite.app, then restart the app; turn it off with adb shell setprop debug.firebase.analytics.app .none.. Firebase on iOS: add the launch argument -FIRDebugEnabled to the Xcode scheme. Events then appear in Firebase › DebugView within seconds. GA4 on the web: use Google Tag Assistant, or a build that sets debug_mode, and watch Admin › DebugView. Ask the developers which tools and switches your app uses.

Keep test traffic out of real data

Test events mixed into production analytics distort the very numbers you’re protecting. Teams avoid it with a separate analytics project for test builds, a “test user” property that dashboards filter out, or by disabling analytics in debug builds (in which case you need a special build to test it). Ask how your team does it before you start clicking.

Check this part

  1. You tap Add in the mobile app, but the normal dashboard shows no add_to_cart. What's the most likely reason?

  2. Which tool shows the raw analytics requests a mobile app sends?

See events with the analytics tool's debug view, a proxy, browser DevTools or the device log; mobile apps send events in batches, so use debug mode for live checks.

Part Not started

Common analytics bugs

BugExampleTypical cause
Missing eventpurchase never fires on iOSTracking added on one platform only, or removed when the code was rewritten
Duplicate eventadd_to_cart twice per tapThe code that sends it runs twice, or a retry sends it again
Too earlypurchase when Pay is tapped, even if the payment failsTracking tied to the button, not to the result
Wrong name or propertyterm instead of search_termDevelopers guessed instead of reading the plan
Wrong type or unitvalue: 2490 (cents) instead of 24.90Backend and app use different units
Personal dataemail: "anna@example.com" in an eventCopying a whole user object into the event
Consent ignoredEvents sent before the user answers, or after they declineTracking starts on app launch
Screen names wrongEvery screen reported under the same code name, like MainActivityAutomatic screen tracking that nobody set up with readable names

Practice: find the bugs in QuickBite’s tracking

Use the app like a hungry customer. Answer the analytics prompt, search for pizza, open a restaurant, add a dish, go to checkout, and pay, once with the working card and once with the declined test card. Watch the debug view under the phone, and open the tracking plan. Six bugs are waiting.

🐞 Bug hunt: QuickBite analytics

This demo has 6 hidden bugs. Explore it like a tester, then check your findings.

Found0/6
9:41

Hungry, Anna?

🍕 Pizza Uno
🍜 Noodle Bar
🥗 Green Bowl

Help us improve QuickBite?

We’d like to collect anonymous usage data. You can change this later in Settings.

Analytics debug view · 2 events

19:30:00 app_open
19:30:00 screen_view {"screen_name":"home"}
Tracking plan
app_open
—
screen_view
screen_name
search
search_term, results
add_to_cart
item_id, price (€), quantity
begin_checkout
value (€), items
purchase
order_id, value (€), currency — only after a successful payment

Rule: no event before the user allows analytics, none after “No thanks”, and no personal data in any event.

  1. 1

    Hint: Look at the debug view right after launch, before you tap anything. Try Relaunch app.

  2. 2

    Hint: Tap Add once and count the new events.

  3. 3

    Hint: Search for something and compare the event with the tracking plan.

  4. 4

    Hint: Open the cart and read the begin_checkout event.

  5. 5

    Hint: Pay with the working card and compare value with the price on the button.

  6. 6

    Hint: Choose the declined test card and tap Pay.

Check this part

  1. The purchase event fires when Pay is tapped, even if the card is declined. What's wrong?

  2. Which data must never be sent in analytics events?

Missing, duplicate and early events, wrong names, properties and units, personal data, consent ignored, and a QuickBite debug view to find six of them.

Part ProNot started

Example test cases

TC-ANL-001No events before consent

Preconditions

  • Fresh install
  • Debug view or proxy running

Steps

  1. Launch the app
  2. Wait on the consent prompt for 30 seconds without answering

Expected result

No analytics events or requests are sent.

TC-ANL-002No events after declining

Steps

  1. Launch the app and tap No thanks
  2. Search, add a dish and pay

Expected result

No analytics events. The app works normally.

TC-ANL-003add_to_cart is sent once with the planned properties

Preconditions

  • Analytics allowed
  • Debug view open

Steps

  1. Open Pizza Uno
  2. Tap Add on Margherita once

Expected result

Exactly one add_to_cart with item_id "d_101", price 12.45 (number), quantity 1.

TC-ANL-004purchase only after a successful payment, with the value in euros

Steps

  1. Pay for 2 Margheritas with the declined test card
  2. Pay again with the working test card

Expected result

No purchase for the declined attempt. One purchase for the successful one, value 24.90, currency "EUR", the real order_id.

TC-ANL-005No personal data in any event

Steps

  1. Use the main flows with a test account
  2. Search all captured events for the account's email, name and phone number

Expected result

None of them appear in any event or property.

TC-ANL-006Same events on iOS, Android and the web

Steps

  1. Do the same order on each platform
  2. Compare the captured events

Expected result

The same event names, property names, types and values on every platform.

Tip: click a test case to expand it.

Keeping tracking from breaking again

  • Add tracking to the acceptance criteria of each story that adds or changes a flow: “fires begin_checkout once with value and items”.
  • Regression: events break silently when code is rewritten. Add key events (purchase, sign_up) to the regression and smoke checks before releases. See Regression and Smoke Suites.
  • Automation: UI tests can capture analytics requests and check names and properties; some teams validate every event against the tracking plan automatically.
  • Watch after release: a sudden drop or jump in a key event right after a release is usually a tracking bug, not user behavior. See Release Testing.

To keep tracking from breaking again: put events into stories’ acceptance criteria, add key events like purchase to the release regression, and look at the key numbers right after each release: a sudden jump or drop is usually a tracking bug.

Check this part

  1. Right after a release, add_to_cart doubles while orders stay the same. What's the most likely explanation?

  2. Where should analytics requirements live so they get tested?

Analytics test cases for consent, single events, properties, failed flows and personal data, and how to keep tracking from breaking again.

The rest of this lesson is in Bugwise Pro

The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.

Part ProNot started

Mobile vs web

  • Batching: use debug mode for live checks; then also check that normal builds upload events eventually (after backgrounding, after a while).
  • Offline: events created offline should be stored and sent later, once, with the original time, not lost or duplicated.
  • App states: is app_open sent on every return from the background, or only on a cold startCold startLaunching an app whose process isn't running, the slowest kind of launch, compared with a warm or hot start.Open in glossary →? Check against the plan.
  • Screen tracking: automatic screen names are often names from the code, not names a person would use. Check that every screen has a readable name.
    Dev note
    Typical leftovers are class names such as MainActivity on Android or UIHostingController on iOS.
  • App Tracking Transparency (ATT) on iOS: if the app asks for tracking permission, test both answers and what changes.
  • Old app versions keep sending old events for months. Changing an event name means both names exist in the data for a long time.
  • DevTools Network tab: filter by the analytics domain; tick Preserve log so events sent just before a page change aren’t lost from view.
  • Consent bannerConsent bannerThe banner that asks permission before setting non-essential cookies.Open in glossary →: no analytics requests or cookies before a choice, none after Reject, and they start right after Accept.
  • Ad blockers block many analytics scripts. Real numbers are lower than real traffic; the site must still work with them blocked.
  • Single-page apps: page views must fire on route changes, not only on the first load.
  • Back and refresh: a refresh of the confirmation page must not send purchase again.

Check this part

  1. The user refreshes the order confirmation page. What should happen to the purchase event?

  2. Why can analytics numbers on a website be lower than the real traffic?

Batching, app states and offline on mobile; consent banners, ad blockers, page reloads and single-page apps on the web.

The rest of this lesson is in Bugwise Pro

The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.

Checklist

Analytics testing checklist

0 of 12 checked

Key takeaways

  • Analytics bugs are invisible to users but mislead every decision made from the numbers.
  • The tracking plan is the spec: event names, when they fire, properties with types and allowed values.
  • See events with a debug view, proxy, DevTools or the device log. Mobile events are batched, so use debug mode.
  • Classic bugs: missing, duplicate and too-early events, wrong names, types and units, personal data, and consent ignored.
  • Check results, not taps: purchase only after a successful payment.
  • Put tracking into acceptance criteria and the release regression, and watch key numbers after each release.

Finished this page?Nice work, this page is complete!

Mark it as done to track your progress. It's saved in this browser, no account needed.

Its cards are now in your Bites review ⚡
Esc

Type to search the whole site.