Package org.ametys.web.analytics
Class GoogleAnalyticsProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.analytics.AbstractWebAnalyticsProvider
org.ametys.web.analytics.GoogleAnalyticsProvider
- All Implemented Interfaces:
LogEnabled
,PluginAware
,WebAnalyticsProvider
,Configurable
The google analytics provider
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The domain hash.static final String
The analytics GIF URL.static final String
The analytics API version.Fields inherited from class org.ametys.web.analytics.AbstractWebAnalyticsProvider
_id, _label, _pluginName, RANDOM_NUMBER_TOKEN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getEventIdentifier
(String category, String action, String label, int value) Get the event identifierprotected String
_getEventImageUri
(String gaWebId, String eventIdentifier, boolean usePlaceholderTokens) Get an event image URI.getEventImageUri
(Site site, String category, String action, String label, int value, boolean usePlaceholderTokens) Get the event image URIgetEventLinkCampaignParams
(Site site, String campaign, String medium, String source) Get the event link campaign paramsMethods inherited from class org.ametys.web.analytics.AbstractWebAnalyticsProvider
_encodeValue, configure, getId, getLabel, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
GA_GIF_URL
The analytics GIF URL.- See Also:
-
GA_VERSION
The analytics API version.- See Also:
-
DOMAIN_HASH
The domain hash.- See Also:
-
-
Constructor Details
-
GoogleAnalyticsProvider
public GoogleAnalyticsProvider()
-
-
Method Details
-
getEventImageUri
public String getEventImageUri(Site site, String category, String action, String label, int value, boolean usePlaceholderTokens) Description copied from interface:WebAnalyticsProvider
Get the event image URI- Parameters:
site
- the sitecategory
- the event categoryaction
- the event actionlabel
- the event labelvalue
- the event valueusePlaceholderTokens
-true
to use placeholder tokens in the URI- Returns:
- the event image URI
-
_getEventIdentifier
Get the event identifier- Parameters:
category
- the event categoryaction
- the event actionlabel
- the event labelvalue
- the event value- Returns:
- the event identifier
-
_getEventImageUri
protected String _getEventImageUri(String gaWebId, String eventIdentifier, boolean usePlaceholderTokens) Get an event image URI.- Parameters:
gaWebId
- the GA web ID.eventIdentifier
- the event identifier.usePlaceholderTokens
- True to use tokens instead of randomly generated values- Returns:
- the event image URI.
-
getEventLinkCampaignParams
Description copied from interface:WebAnalyticsProvider
Get the event link campaign params- Parameters:
site
- the sitecampaign
- the event campaignmedium
- the event mediumsource
- the event source- Returns:
- the event link campaign params
-