-
public interface AnalyticsProviderDefines the contract for an analytics provider. Concrete implementations of this interface will integrate with specific analytics services (e.g., Firebase, Mixpanel).
-
-
Method Summary
Modifier and Type Method Description abstract UnitlogEvent(String eventName, Map<String, Object> parameters)Logs a generic event to the analytics service. abstract UnitsetUserId(String userId)Sets the user ID for the current analytics session. abstract UnitsetUserProperty(String key, String value)Sets a user property for the current analytics session. -
-
Method Detail
-
logEvent
abstract Unit logEvent(String eventName, Map<String, Object> parameters)
Logs a generic event to the analytics service.
- Parameters:
eventName- The name of the event to log (e.g., "screen_view", "button_click").parameters- A map of key-value pairs representing the event's properties.
-
setUserId
abstract Unit setUserId(String userId)
Sets the user ID for the current analytics session.
- Parameters:
userId- The unique identifier for the user.
-
setUserProperty
abstract Unit setUserProperty(String key, String value)
Sets a user property for the current analytics session.
- Parameters:
key- The name of the user property.value- The value of the user property.
-
-
-
-