/** * Sends a screen view to Google Analytics, if a screenview hasn't already been sent since the * fragment was loaded. This prevents background syncs from causing superflous screen views. * * @param sessionTitle The name of the session being tracked. */ private void fireAnalyticsScreenView(String sessionTitle) { if (!mAnalyticsScreenViewHasFired) { // ANALYTICS SCREEN: View the Session Details page for a specific session. // Contains: The session title. AnalyticsHelper.sendScreenView("Session: " + sessionTitle); mAnalyticsScreenViewHasFired = true; } }
/* * Event structure: * Category -> "Session Details" * Action -> Link Text * Label -> Session's Title * Value -> 0. */ private void fireLinkEvent(int actionId, SessionDetailModel data) { // ANALYTICS EVENT: Click on a link in the Session Details page. // Contains: The link's name and the session title. AnalyticsHelper.sendEvent("Session", getString(actionId), data.getSessionTitle()); }