Sub topic 9
Inspecting events, parameters and user properties in DebugView
DebugView shows the events from your debug devices as they arrive, one device at a time. This chapter covers how to read its three areas and how to check each event's parameters and user properties against your tracking plan.
This chapter assumes four things:
- You can already send debug traffic, as covered in the previous chapters on debug mode.
- You can open DebugView (Admin, then Data display, then DebugView).
- You know the difference between an event, an event parameter and a user property.
- You can edit the site or app code, or work with someone who can.
What DebugView shows
DebugView shows only events flagged as debug traffic. It does not show the rest of your property's data. It shows these events almost immediately, without the aggregation and processing that standard reports apply. That makes it the right tool for answering the question "did this exact interaction send the exact data I intended?"
The page has three working areas, and the first thing to choose is the debug device.
The debug device selector
The selector sits at the top of the page. It lists the devices that have sent debug traffic recently, usually identified by browser, operating system or device model. If several people test at once, you will see several entries. Select the one that is yours. A common mistake is to stare at an empty timeline while the events are arriving under a different device.
If you only have one test device, DebugView often selects it for you. If the list is empty, no debug traffic has arrived. Go to the troubleshooting chapter rather than changing anything here.
The minutes and seconds timelines
The central timeline is split into two levels:
- Minutes stream. Each row is one minute of activity, with the events of that minute grouped together. It covers roughly the last 30 minutes. Use it to see whether activity is arriving at all, and in which order the minutes occurred.
- Seconds stream. Click a minute to see the individual events in that minute with their order and timing. Use it to check sequence, for example that
view_itemcomes beforeadd_to_cart, and that a single click did not fire the same event twice.
Events appear as small labelled markers. Events you have marked as key events carry a flag, so you can confirm a key event fires without leaving the page. The same events also appear in the summary cards, which list your most frequent events and key events for the selected device.
Inspecting event parameters
Click an event name in the seconds stream. A panel opens with every parameter that event carried, each shown as a name and a value.
DebugView shows all parameters that were sent, whether or not you have registered them as custom dimensions or metrics. Standard reports only show registered ones. So "it appears in DebugView but not in my report" usually means registration is missing, and the data itself is fine. The reverse, a parameter missing in DebugView, means the code did not send it.
Consider this code, which sends a purchase event.
gtag('event', 'purchase', {
'transaction_id': 'T-1001',
'value': 59.98,
'currency': 'EUR',
'coupon': 'SPRING10',
'debug_mode': true,
'items': [
{ 'item_id': 'SKU-1', 'item_name': 'Notebook', 'price': 29.99, 'quantity': 2 }
]
});After triggering it, open DebugView, select your device, click the minute, and click purchase. A correct implementation shows:
transaction_idasT-1001valueas59.98, a numbercurrencyasEURcouponasSPRING10- the
itemslist with its item fields - automatically collected parameters, such as
page_location,page_title,ga_session_id,ga_session_numberandengagement_time_msec
The exact set of automatic parameters depends on the platform and the SDK version, so do not treat it as a fixed list.
What to check on each event
| Check | What to look for | Typical cause of a failure |
|---|---|---|
| Event name | Exact spelling and case match your plan | `Sign_Up` instead of `sign_up`. Names are case sensitive |
| Parameter present | Every planned parameter appears | The code reads a variable that is empty, or the tag omits the field |
| Parameter value | The value is the real one, not a template placeholder | A GTM variable returns `undefined` or the text of an unresolved variable |
| Value type | Numbers look like numbers, such as `59.98` | A price sent as the string `"$59.98"` cannot be summed |
| Event count | The event occurs once per action | Two tags or two triggers fire the same event |
| Key event flag | Key events carry the flag | The event name differs from the one marked as a key event |
Limits that can silently drop data
Standard properties enforce limits on what DebugView can show you. Event and parameter names are capped at 40 characters, and a parameter value at 100 characters. An event can carry up to 25 custom parameters. If a long value is truncated, or a twenty-sixth parameter is missing, compare your payload with these limits before suspecting the tooling.
Inspecting user properties
User properties describe the user rather than the action, such as plan_type or customer_tier. Their values persist across events from the same user until you change them.
In DebugView they appear in a user properties card, tied to the selected debug device. When you click an event, you also see the properties that were attached to it. Set one on the web like this:
gtag('set', 'user_properties', {
'plan_type': 'premium'
});
gtag('event', 'login', {
'method': 'email',
'debug_mode': true
});Open the login event in DebugView and confirm that plan_type shows premium. Check these points:
- Order matters. A user property is attached to events sent after it is set. If you set it after the event, the event will not carry it.
- Value length. A user property value is capped at 36 characters. Longer values are truncated or rejected.
- Registration. As with parameters, DebugView shows the property even if you have not registered it as a custom dimension with user scope. Reports need the registration.
- Changes. To confirm an update, set a new value, trigger another event, and check that the later event carries the new value while the earlier one keeps the old one.
A worked inspection routine
For a changed implementation, a reliable routine is:
- Select your debug device.
- Perform one action on the site or in the app, such as adding an item to the cart.
- Click the newest minute in the minutes stream.
- In the seconds stream, find the event and confirm that it appears once.
- Click it and compare each parameter and value with your tracking plan.
- Check the user properties card for the expected values.
- Repeat for the next action, and compare the order of events with the real user journey.
Do one action at a time. If you click through five pages quickly, the seconds stream becomes hard to read, and you cannot tell which action produced which event.
Common reading mistakes
- Wrong device selected. The timeline looks empty, but events sit under another device entry.
- Reading old minutes. The stream keeps recent history. Click the latest minute, not one from before your change.
- Assuming an event is missing when it is grouped. Several events in one minute are grouped. Open the minute to see them separately.
- Treating DebugView counts as report numbers. They cover one device and a short window, so they will never match a standard report.
Exercise
You send a generate_lead event with a parameter lead_source and the user property plan_type. In DebugView you see the event once, lead_source shows webinar, but plan_type is missing from that event. The code sets plan_type in a call that runs after the event is sent. What should you change, and why is the missing property not a registration problem?
Show answer
Move the gtag('set', 'user_properties', ...) call so it runs before the generate_lead event. A user property is attached only to events sent after it is set. Registration is not the cause because DebugView shows user properties and parameters whether or not they are registered as custom dimensions. Registration only affects whether they appear in standard reports.
Exercise
A colleague says the purchase event in DebugView shows value as $59.98, and asks whether this is fine because the value is visible. What is the problem and how do you fix it?
Show answer
The value was sent as a string with a currency symbol, so it cannot be used as a number for revenue. Send a plain number such as 59.98 and put the currency code in the separate currency parameter, then confirm in DebugView that the value shows as 59.98.