Package org.dspace.google.client
Class GoogleAnalytics4ClientRequestBuilder
java.lang.Object
org.dspace.google.client.GoogleAnalytics4ClientRequestBuilder
- All Implemented Interfaces:
GoogleAnalyticsClientRequestBuilder
public class GoogleAnalytics4ClientRequestBuilder
extends Object
implements GoogleAnalyticsClientRequestBuilder
Implementation of
GoogleAnalyticsClientRequestBuilder that compose
the request for Google Analytics 4 (GA4).- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass that model the params of a specific event to be sent to GA.static classClass that models the json of the events to be write in the body of the GA request.static classClass that model a single event to be sent to GA. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomposeRequestsBody(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.getEndpointUrl(String analyticsKey) Returns the url of the Google Analytics endpoint.voidsetConfigurationService(ConfigurationService configurationService)
-
Constructor Details
-
GoogleAnalytics4ClientRequestBuilder
-
-
Method Details
-
getEndpointUrl
Description copied from interface:GoogleAnalyticsClientRequestBuilderReturns the url of the Google Analytics endpoint.- Specified by:
getEndpointUrlin interfaceGoogleAnalyticsClientRequestBuilder- Parameters:
analyticsKey- the Google Analytics key- Returns:
- the endpoint url
-
composeRequestsBody
Description copied from interface:GoogleAnalyticsClientRequestBuilderReturns the body of the requests to be sent to Google Analytics as string, based on the given analytics key and events.- Specified by:
composeRequestsBodyin interfaceGoogleAnalyticsClientRequestBuilder- Parameters:
analyticsKey- the Google Analytics keyevents- the events to be sent- Returns:
- the requests body as string
-
setConfigurationService
-