AnalyticsReporter

Product analytics: what people do in the app, as GA4 events, screen views and user properties.

Analytics belong to the UI layer, where the action happens: a composable reports through LocalTelemetry and a ViewModel through its injected TelemetryRepository. Code under data/ and domain/ never reports analytics: a repository returns its outcome, such as whether an unlock was saved, and the screen that asked reports it. checkModuleBoundaries enforces that rule.

Inheritors

Functions

Link copied to clipboard
abstract fun logEvent(event: AnalyticsEvent)
Link copied to clipboard
abstract fun logScreenView(screenName: String, screenClass: String? = null)
Link copied to clipboard

Logs standard GA4 search event with parameter search_term.

Link copied to clipboard
fun AnalyticsReporter.logSelectContent(contentType: String, itemId: String)

Logs standard GA4 select_content event with parameters content_type and item_id.

Link copied to clipboard
fun AnalyticsReporter.logShare(method: String, contentType: String, itemId: String)

Logs standard GA4 share event with parameters method, content_type, and item_id.

Link copied to clipboard

Logs standard GA4 tutorial_begin event.

Link copied to clipboard

Logs standard GA4 tutorial_complete event.

Link copied to clipboard

Logs standard GA4 unlock_achievement event with parameter achievement_id.

Link copied to clipboard
fun AnalyticsReporter.logViewItem(itemId: String, itemName: String, itemCategory: String? = null)

Logs standard GA4 view_item event with parameters item_id, item_name, and optional item_category.

Link copied to clipboard
fun AnalyticsReporter.logViewItemList(itemListId: String? = null, itemListName: String? = null)

Logs standard GA4 view_item_list event with optional parameters item_list_id and item_list_name.

Link copied to clipboard
abstract fun setUserProperty(name: String, value: String?)