Overview
The Analytics Viewer is a diagnostic tool in KOS Studio that provides real-time visibility into analytics events as they’re recorded by your KOS applications. When developing applications for KOS devices, understanding what analytics data is being captured, how it’s classified, and where it’s being routed is essential for ensuring your analytics pipeline works correctly. The Analytics Viewer bridges the gap between development and operations, allowing you to monitor, inspect, and validate analytics events as they flow from your application to their intended destinations.
This tool is particularly valuable during application development for debugging analytics implementations, verifying that custom event classifiers are working correctly, and ensuring that device information flows reliably from KOS applications to analytics platforms.
Understanding KOS Analytics
Before using the Analytics Viewer, it’s helpful to understand how analytics work in KOS.
What Are Analytics Events?
Analytics events are structured data records that capture information about what’s happening in your application and on your device. These events might include:
- User interactions (button presses, menu selections)
- System state changes (device startup, mode transitions)
- Operational metrics (pour counts, error occurrences)
- Performance data (response times, resource usage)
- Business events (transactions, configurations)
Each analytics event contains:
- Event Type: A category or identifier for what kind of event occurred
- Timestamp: When the event was recorded
- Priority: The importance or severity level of the event
- Node ID: Which node in the system generated the event
- JSON Payload: The complete event data with all parameters and details
How Are Events Recorded?
Events are recorded by the KOS Core AnalyticsService, which acts as the central system for capturing, classifying, and routing analytics data. When your application code records an event, the AnalyticsService:
- Captures the event with all its data
- Assigns metadata like timestamp and node ID
- Classifies the event based on configured rules
- Routes the event to appropriate channels for export
What Are Channels?
Channels are destinations or groupings for analytics events. They represent different ways events can be classified and routed for export to analytics platforms. Your device defines channels based on:
- Event types or categories
- Event priorities
- Intended destinations (different analytics platforms)
- Custom classification rules
Default Channel:
Every device always has at least a “Default” channel. Events that don’t match specific channel criteria typically go to the default channel.
Custom Channels:
Developers can create custom channels to route specific types of events to specific destinations. For example:
- An “Errors” channel for error events
- A “UserInteractions” channel for UI events
- A “Performance” channel for metrics
- A “BusinessEvents” channel for transaction data
Channels help you verify that your custom classifiers are working correctly—you can see which events end up in which channels and confirm they’re being routed as intended.
Accessing the Analytics Viewer
Opening the Tool
- Log into KOS Studio
- In the Connection Manager window, locate your running image (connected to a simulator or device)
- Ensure the image is in an active state
- Find the Active Tools section for that connection
- Click + Start New Tool
- Select Analytics Viewer from the dropdown menu
Understanding the Analytics Viewer Interface
The Analytics Viewer is organized around channels, allowing you to see how events are classified and routed.
Initial View – Channels List
When you first open the Analytics Viewer, you see a list of all analytics channels defined by your device:
Channel Display:
- All available channels are listed
- The Default channel is always present
- Channels appear in a consistent order
- Each channel shows its name
Channel States:
- Channels may or may not contain events
- New channels appear automatically when activated by the device
Navigating to Channel Details
To view the events in a specific channel:
- Click on a channel from the channels list
- A channel detail view opens showing events for that channel
- The channel remains accessible in the channels list
- The selected channel is visually indicated as currently open
Multiple Channel Views:
You can open multiple channel detail views simultaneously:
- Each channel view shows events for that specific channel
- Previously opened views remain accessible
- You can switch between multiple open channel views
- Navigation elements show all open views for quick switching
Closing a Channel View:
When you close a channel detail view:
- That channel’s view is removed from open views
- The channel returns to an unopened state in the channels list
- Other open channel views remain unaffected
Viewing Channel Events
Events List
When you open a channel detail view, you see all analytics events for that channel:
Event Information:
- Event Type: The category or identifier for the event
- Timestamp: When the event was recorded
- Events are displayed in chronological order with most recent first
- Summary information may include key parameter values or event counts
Real-Time Updates:
New events appear automatically as they’re recorded:
- Events are positioned according to the current sort order (newest first)
- The list updates in real-time as your application generates events
Empty State:
If a channel contains no events:
- You see a message indicating no events have been recorded in this channel
- This is normal for channels that handle specific event types that haven’t occurred yet
Viewing Event Details
Opening Event Details
To see comprehensive information about a specific event:
- Click on an event from the events list
- The event detail view opens showing complete information
- You can see all aspects of the event including its full JSON payload
Event Detail Information
The event detail view displays:
Event Metadata:
Priority:
The importance or severity level of the event, clearly labeled and visible alongside other general details.
Event Type:
The category or identifier for what kind of event occurred, helping you understand the event’s purpose.
Timestamp:
When the event was recorded, displayed in a clear format alongside other details.
Node ID:
Which node in the system generated this event, useful for multi-node device configurations.
JSON Payload:
The complete event data is properly formatted as readable JSON. This includes:
- All event data and parameters
- Nested objects and arrays (expandable/collapsible)
- Full depth of the JSON structure
- Proper formatting for easy reading
Copying Event Data
To use event data in other applications, you can copy individual fields:
Copy Actions:
- Each copyable field has a visible copy action (icon or button)
- Copy actions are consistently positioned across all fields
- Confirmation messages appear briefly after successful copy
- The confirmation specifies which field was copied
- Copied data can be pasted into external applications with format preserved
Closing Event Details
To return to the events list:
- Click the close action in the event detail view
- The detail view closes
- You return to the events list
- The event remains in its original position in the list
Event Persistence
Analytics events persist in the Analytics Viewer:
Session Persistence:
- Events remain visible even if you navigate away from the Analytics Viewer
- When you return, all previously recorded events are still visible
- Events maintain their chronological order
- You can review historical events alongside new ones
Continuous Recording:
The Analytics Viewer continues to capture events as they’re recorded by the application, building a complete history during your session.
Offline Behavior
When KOS Studio Server Goes Offline:
- The tool continues to function normally
- Analytics events continue to be captured from the device
- No changes to tool behavior
- Standard offline indicators may appear per KOS Studio conventions
Practical Usage Scenarios
Verifying Analytics Implementation
When developing analytics tracking:
- Open Analytics Viewer before performing operations
- Trigger the action that should generate an analytics event
- Check the Default channel for the new event
- Open the event to verify the JSON payload contains expected data
- Confirm all required fields are present and correctly formatted
- Verify the event type, priority, and other metadata are correct
Testing Custom Event Classifiers
When implementing custom channel routing:
- Open Analytics Viewer
- Review the channels list to see your custom channels
- Perform actions that should generate specific event types
- Open each custom channel to verify events appear in the correct channel
- Check the Default channel to see if any events fell through to default
- Adjust classification rules if events aren’t routing correctly
Debugging Analytics Issues
When analytics aren’t working as expected:
- Open Analytics Viewer to see what events are actually being recorded
- Check if events are being recorded at all (look in Default channel first)
- Review event timestamps to verify timing
- Open event details to examine JSON payloads for data issues
- Copy JSON payloads to compare with expected format
- Verify node IDs match expected sources in multi-node systems
- Check if events are being routed to wrong channels
Monitoring Application Behavior
For understanding application activity:
- Keep Analytics Viewer open while using your application
- Watch events appear in real-time
- Identify which user actions generate which events
- Verify business logic triggers appropriate analytics
- Monitor event frequency to understand usage patterns
- Use multiple channel views to monitor different event categories simultaneously
Validating Event Data
When ensuring data quality:
- Trigger events and immediately check their details
- Verify all expected fields are present in the JSON payload
- Check data types and formats match specifications
- Look for nested data structures to ensure completeness
- Copy JSON payloads for detailed offline analysis or sharing with team members
- Compare events across different operations to ensure consistency
Tips for Effective Use
- Start with the Default channel: When first exploring analytics, check the Default channel to see all events being recorded
- Open multiple channels: Keep several channel views open to monitor different event categories simultaneously
- Watch real-time updates: The automatic refresh shows exactly when events are generated in response to actions
- Use event details liberally: Don’t hesitate to open events to see their full JSON—this is the most complete information
- Copy data for analysis: Use copy functions to extract event data for documentation or detailed analysis in other tools
- Check priorities: Event priorities help you identify which events are most important or problematic
- Verify routing early: Test custom channel routing early in development to catch classification issues
- Monitor timestamps: Timestamp order helps you understand the sequence of operations
- Keep views open: Leave channel views open throughout your development session for quick reference
- Use node IDs: In multi-node systems, node IDs help you identify which part of the system generated each event
