Interface GoogleAnalyticsClientRequestBuilder

All Known Implementing Classes:
GoogleAnalytics4ClientRequestBuilder, UniversalAnalyticsClientRequestBuilder

public interface GoogleAnalyticsClientRequestBuilder
Interface for classes used by GoogleAnalyticsClient to define the url and the body of the requests to be sent to Google Analytics.
Author:
Luca Giamminonni (luca.giamminonni at 4science.it)
  • Method Details

    • getEndpointUrl

      String getEndpointUrl(String analyticsKey)
      Returns the url of the Google Analytics endpoint.
      Parameters:
      analyticsKey - the Google Analytics key
      Returns:
      the endpoint url
    • composeRequestsBody

      List<String> composeRequestsBody(String analyticsKey, List<GoogleAnalyticsEvent> events)
      Returns the body of the requests to be sent to Google Analytics as string, based on the given analytics key and events.
      Parameters:
      analyticsKey - the Google Analytics key
      events - the events to be sent
      Returns:
      the requests body as string