Sub topic 12
Testing Key Events with DebugView and Realtime
Assume you already have a GA4 property, a web data stream, and Editor access. You should also know whether your site sends events with gtag.js or Google Tag Manager. Test events before marking them as key events or using them for business decisions.
DebugView and Realtime have different jobs
DebugView is a live diagnostic view. It helps you inspect one test device and open each event to check its parameters.
Realtime is a live monitoring report. It helps you confirm that activity reaches the property and appears to other users. Realtime is useful for checking the production path, but it exposes fewer debugging details than DebugView.
Prepare a controlled test
Use a test lead or a test order that you can identify without exposing personal information. Record the expected values before testing:
- Event name, such as
generate_leadorpurchase. - Expected value and currency.
- For a purchase, the unique
transaction_id. - Expected item details, if the event includes an
itemsarray. - The page or action that should trigger the event.
Open the site in a separate browser window or device. Avoid testing while another person is completing a real purchase, because you could confuse the results.
Use DebugView
To make an event visible in DebugView, enable debug mode for the test event. Google Tag Manager Preview mode normally adds the required debug signal. With gtag.js, your implementation can send the debug_mode parameter while testing. Do not leave forced debug mode enabled for every visitor.
In GA4, open Admin > Data display > DebugView. Select the test device if several devices appear. Trigger the form submission or test purchase, then look for the event on the timeline.
Open the event and inspect its parameters. Confirm that:
| Check | Expected result |
|---|---|
| Event name | Exactly matches the configured name |
| `value` | Contains the intended numeric amount |
| `currency` | Uses a valid three-letter currency code |
| `transaction_id` | Is present and unique for a purchase |
| Consent behavior | Matches the site's consent settings |
A missing event often means the tag did not fire, the browser blocked the request, consent prevented measurement, or the event was sent to a different measurement ID.
Confirm the event in Realtime
Open Reports > Realtime in another tab. Trigger the event and watch the event count or event-name section. Realtime can take a short time to update. Confirm that the event reaches the intended property and stream.
DebugView is better for parameter-level inspection. Realtime is better for confirming that the normal collection path works without relying only on a preview tool. If DebugView shows an event but Realtime does not, check the selected property, filters, consent state, and event timestamp before changing the implementation.
After testing, wait for normal report processing before evaluating key event totals. A successful DebugView check proves that a test event arrived. It does not prove that historical reports, attribution, or advertising imports are already complete.
Exercise
A purchase appears in DebugView, but its transaction_id is missing. Should you mark the event as a key event?
Show answer
No. Fix the purchase payload first. Without a stable transaction ID, repeated confirmation-page loads can create duplicate sales.