* fix analytics behaviour

This commit is contained in:
Reinhard Pointner 2011-10-24 08:44:23 +00:00
parent 3fd678c996
commit cc094cd751
1 changed files with 2 additions and 11 deletions

View File

@ -30,8 +30,6 @@ public class Analytics {
private static final VisitorData visitorData = restoreVisitorData();
private static final JGoogleAnalyticsTracker tracker = new JGoogleAnalyticsTracker(getConfig(getApplicationProperty("analytics.WebPropertyID"), visitorData), V_4_7_2);
private static String currentView = null;
public static void trackView(Class<?> view, String title) {
trackView(view.getName().replace('.', '/'), title);
@ -42,15 +40,8 @@ public class Analytics {
if (!tracker.isEnabled())
return;
if (currentView == null) {
// track application startup
tracker.trackPageViewFromSearch(view, title, host, getJavaVersionIdentifier(), getDeploymentMethod());
} else {
// track view change
tracker.trackPageView(view, title, host);
}
currentView = view;
// track application startup
tracker.trackPageViewFromSearch(view, title, host, getJavaVersionIdentifier(), getDeploymentMethod());
}