Package 

Interface AnalyticsProvider


  • 
    public interface AnalyticsProvider
    
                        

    Defines 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 Unit logEvent(String eventName, Map<String, Object> parameters) Logs a generic event to the analytics service.
      abstract Unit setUserId(String userId) Sets the user ID for the current analytics session.
      abstract Unit setUserProperty(String key, String value) Sets a user property for the current analytics session.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.