Annotation Interface EnableGoogleAnalytics
Annotation that enables automatic Google Analytics tracking if
present on the application's main layout.
Any navigation event will be tracked as a page view unless the @Route
class is also annotated with @IgnorePageView. It is possible to
manually track page views or other events through the tracker instance
available through GoogleAnalyticsTracker.getCurrent() or
GoogleAnalyticsTracker.get(UI).
This annotation only has properties for the most commonly used configuration
options. For low-level configuration or programmatic configuration, the
application's main layout can also implement TrackerConfigurator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumClient-side log levels that can be configured throughproductionLogging()anddevLogging().static enumSend mode settings that can be configured throughsendMode(). -
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDeprecated.Since GA4 Configure the cookie domains through analytics interface.Client-side log level to use when Vaadin is not run in production mode.A prefix to add to the URL of all page views.Client-side log level to use when Vaadin is run in production mode.Mode to determine whether page views and events should actually be sent to Google Analytics.
-
Element Details
-
value
-
cookieDomain
Deprecated.Since GA4 Configure the cookie domains through analytics interface.The cookie domain setting. By default,autois used.- Returns:
- the cookie domain setting
- Default:
"auto"
-
productionLogging
EnableGoogleAnalytics.LogLevel productionLoggingClient-side log level to use when Vaadin is run in production mode. By default, nothing is logged during production.- Returns:
- the production log level
- Default:
NONE
-
devLogging
EnableGoogleAnalytics.LogLevel devLoggingClient-side log level to use when Vaadin is not run in production mode. By default, debug logging is used when production mode is not enabled.- Returns:
- the non-production log level
- Default:
DEBUG
-
sendMode
EnableGoogleAnalytics.SendMode sendModeMode to determine whether page views and events should actually be sent to Google Analytics. By default, sending is enabled only when Flow is run in production mode.- Returns:
- the used send mode
- Default:
PRODUCTION
-
pageviewPrefix
String pageviewPrefixA prefix to add to the URL of all page views. By default, not prefix is added.- Returns:
- the prefix to add to page view URLs
- Default:
""
-