Package org.dspace.google.client
Class UniversalAnalyticsClientRequestBuilder
- java.lang.Object
-
- org.dspace.google.client.UniversalAnalyticsClientRequestBuilder
-
- All Implemented Interfaces:
GoogleAnalyticsClientRequestBuilder
public class UniversalAnalyticsClientRequestBuilder extends Object implements GoogleAnalyticsClientRequestBuilder
Implementation ofGoogleAnalyticsClientRequestBuilderthat compose the request for Universal Analytics (UA).- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
-
Constructor Summary
Constructors Constructor Description UniversalAnalyticsClientRequestBuilder(String endpointUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.StringgetEndpointUrl(String analyticsKey)Returns the url of the Google Analytics endpoint.
-
-
-
Constructor Detail
-
UniversalAnalyticsClientRequestBuilder
public UniversalAnalyticsClientRequestBuilder(String endpointUrl)
-
-
Method Detail
-
getEndpointUrl
public String getEndpointUrl(String analyticsKey)
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
public List<String> composeRequestsBody(String analyticsKey, List<GoogleAnalyticsEvent> events)
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
-
-