QA Mode
QA Mode enables debug logging in the browser console for custom events and viewport visibility events, making it easy to verify your integration during development and staging.
Enable via URL
Add ?tlog_mode=qa to any URL in your browser:
https://your-app.com/dashboard?tlog_mode=qa
QA Mode persists across page loads for the rest of the browser session (stored in sessionStorage). To disable it:
https://your-app.com/dashboard?tlog_mode=qa_off
The ?tlog_mode=qa URL parameter is auto-detected in development builds only. In production bundles, use tracelog.setQaMode(true) programmatically instead.
Enable Programmatically
tracelog.setQaMode(true); // Enable
tracelog.setQaMode(false); // Disable
Call this before or after init(). Works in both development and production builds.
What You See in QA Mode
When QA Mode is active, custom events fired with tracelog.event() and viewport_visible events are logged to the browser console with:
- Event name
- Metadata (if provided)
Example console output:
[TraceLog] Custom Event: purchase_completed
{
name: "purchase_completed",
metadata: { orderId: "ORD-789", total: 149.99, currency: "USD" }
}
QA Mode logs custom events and viewport visibility events only. Automatic events (page views, clicks, scrolls, errors, web vitals) are not logged to the console.
Verifying Your Setup
- Open your app in the browser
- Add
?tlog_mode=qato the URL (or calltracelog.setQaMode(true)in production) - Open DevTools → Console
- Trigger the actions you want to verify (add to cart, sign up, etc.)
- Confirm the expected events appear with the correct metadata
Then open your TraceLog dashboard → Analytics to confirm the same events appear server-side.
Use QA Mode alongside the TraceLog troubleshooting guide to diagnose missing events before going to production.