Obviously only the annotation based way is working.
If you only implement the given interface the created config is not really created.
Look for these Lines:
// these Config is not set to the variable “config”
TrackerConfiguration.create(logLevel, sendHits);
private static TrackerConfiguration createConfig(UI ui) {
TrackerConfiguration config = null;
HasElement routeLayout = findRouteLayout(ui);
boolean productionMode = ui.getSession().getConfiguration().isProductionMode();
EnableGoogleAnalytics annotation = routeLayout.getClass().getAnnotation(EnableGoogleAnalytics.class);
if (annotation != null) {
config = TrackerConfiguration.fromAnnotation(annotation, productionMode);
}
if (routeLayout instanceof TrackerConfigurator) {
if (config == null) {
// Use same defaults as in the annotation
LogLevel logLevel = productionMode ? LogLevel.NONE : LogLevel.DEBUG;
boolean sendHits = SendMode.PRODUCTION.shouldSend(productionMode);
// these Config is not set to the variable "config"
TrackerConfiguration.create(logLevel, sendHits);
}
((TrackerConfigurator) routeLayout).configureTracker(config);
}
return config;
}
/Edit:
Just seen there is a fix commit “committed on 19 Jul”.
Do anybody know when there will be an fix release?