Analytics

class Analytics(val highlightedLogType1: AnalyticsLogType? = Click, val highlightedLogType2: AnalyticsLogType? = Error, val highlightedLogType3: AnalyticsLogType? = null) : Module

Analytics module for the DevView developer tools suite.

This module provides real-time analytics event monitoring and visualization, allowing developers to track and debug analytics integration during development and testing.

Features

  • Real-time analytics event logging

  • Newest-first event rows with timestamps and selectable details

  • Screen, action, lifecycle, performance and user event categories

  • Thread-safe in-memory storage

  • Reactive UI updates

Integration

The Analytics module integrates with the DevView core framework as part of the LOGGING section. It provides navigation destinations and UI components that can be accessed through the DevView menu.

Module Configuration

val modules = rememberModules {
module(Analytics())
}
// Pass modules to DevView; registration supplies the tool content.

Logging Events

AnalyticsLogger.log(
AnalyticsLog(
tag = "user_action",
screenClass = "HomeScreen",
timestamp = System.currentTimeMillis(),
type = AnalyticsLogCategory.Action.Click
)
)

See also

Constructors

Link copied to clipboard
constructor(highlightedLogType1: AnalyticsLogType? = Click, highlightedLogType2: AnalyticsLogType? = Error, highlightedLogType3: AnalyticsLogType? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val destinations: PersistentMap<KClass<out NavKey>, DestinationMetadata>

Maps each navigation destination in this module to its DestinationMetadata.

Link copied to clipboard
open override val entryDestination: NavKey
Link copied to clipboard
open override val icon: ImageVector

Icon identifying this module on the home screen.

Link copied to clipboard
open override val moduleName: String

Name displayed on the home screen and default destination toolbar.

Link copied to clipboard
open override val registerSerializers: PolymorphicModuleBuilder<NavKey>.() -> Unit

Registers serializers for navigation destinations.

Link copied to clipboard
open override val section: Section

The section this module belongs to in the DevView menu.

Link copied to clipboard
open override val subtitle: String

Summary displayed on the home screen.

Functions

Link copied to clipboard
Link copied to clipboard
open override fun EntryProviderScope<NavKey>.registerContent(onNavigateBack: () -> Unit, onNavigate: (NavKey) -> Unit, bottomPadding: Dp)

Registers the composable content for each navigation destination.