* better simulate website behaviour
This commit is contained in:
parent
7ee4b06c7c
commit
55db3e62bc
|
@ -26,9 +26,12 @@ public class Analytics {
|
|||
private static final String TIMESTAMP_LAST = "timestampLast";
|
||||
private static final String VISITS = "visits";
|
||||
|
||||
private static final String host = "filebot.sourceforge.net";
|
||||
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);
|
||||
|
@ -39,7 +42,15 @@ public class Analytics {
|
|||
if (!tracker.isEnabled())
|
||||
return;
|
||||
|
||||
tracker.trackPageViewFromSearch(view, title, "filebot.sourceforge.net", getJavaVersionIdentifier(), getDeploymentMethod());
|
||||
if (currentView == null) {
|
||||
// track application startup
|
||||
tracker.trackPageViewFromSearch(view, title, host, getJavaVersionIdentifier(), getDeploymentMethod());
|
||||
} else {
|
||||
// track view change
|
||||
tracker.trackPageView(view, title, host);
|
||||
}
|
||||
|
||||
currentView = view;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue