Source:
protected void track(String eventName, JSONObject properties, boolean isAutomaticEvent) { if (hasOptedOutTracking() || (isAutomaticEvent && !mDecideMessages.shouldTrackAutomaticEvent())) { return; } final Long eventBegin; synchronized (mEventTimings) { eventBegin = mEventTimings.get(eventName); mEventTimings.remove(eventName); mPersistentIdentity.removeTimeEvent(eventName); } try { final JSONObject messageProps = new JSONObject(); final Map<String, String> referrerProperties = mPersistentIdentity.getReferrerProperties(); for (final Map.Entry<String, String> entry : referrerProperties.entrySet()) { final String key = entry.getKey(); final String value = entry.getValue(); messageProps.put(key, value); } mPersistentIdentity.addSuperPropertiesToObject(messageProps); final double timeSecondsDouble = (System.currentTimeMillis()) / 1000.0; final long timeSeconds = (long) timeSecondsDouble; messageProps.put("time", timeSeconds); messageProps.put("distinct_id", getDistinctId()); if (null != eventBegin) { final double eventBeginDouble = ((double) eventBegin) / 1000.0; final double secondsElapsed = timeSecondsDouble - eventBeginDouble; messageProps.put("$duration", secondsElapsed); } if (null != properties) { final Iterator<?> propIter = properties.keys(); while (propIter.hasNext()) { final String key = (String) propIter.next(); if (!properties.isNull(key)) { messageProps.put(key, properties.get(key)); } } } final AnalyticsMessages.EventDescription eventDescription = new AnalyticsMessages.EventDescription(eventName, messageProps, mToken, isAutomaticEvent); mMessages.eventsMessage(eventDescription); if (null != mTrackingDebug) { mTrackingDebug.reportTrack(eventName); } } catch (final JSONException e) { MPLog.e(LOGTAG, "Exception tracking event " + eventName, e); } }

Target:
protected void track(String eventName, JSONObject properties, boolean isAutomaticEvent) { if (hasOptedOutTracking() || (isAutomaticEvent && !mDecideMessages.shouldTrackAutomaticEvent())) { return; } final Long eventBegin; synchronized (mEventTimings) { eventBegin = mEventTimings.get(eventName); mEventTimings.remove(eventName); mPersistentIdentity.removeTimeEvent(eventName); } try { final JSONObject messageProps = new JSONObject(); final Map<String, String> referrerProperties = mPersistentIdentity.getReferrerProperties(); for (final Map.Entry<String, String> entry : referrerProperties.entrySet()) { final String key = entry.getKey(); final String value = entry.getValue(); messageProps.put(key, value); } mPersistentIdentity.addSuperPropertiesToObject(messageProps); final double timeSecondsDouble = (System.currentTimeMillis()) / 1000.0; final long timeSeconds = (long) timeSecondsDouble; messageProps.put("time", timeSeconds); messageProps.put("distinct_id", getDistinctId()); if (null != eventBegin) { final double eventBeginDouble = ((double) eventBegin) / 1000.0; final double secondsElapsed = timeSecondsDouble - eventBeginDouble; messageProps.put("$duration", secondsElapsed); } if (null != properties) { final Iterator<?> propIter = properties.keys(); while (propIter.hasNext()) { final String key = (String) propIter.next(); if (!properties.isNull(key)) { messageProps.put(key, properties.get(key)); } } } final AnalyticsMessages.EventDescription eventDescription = new AnalyticsMessages.EventDescription(eventName, messageProps, mToken, isAutomaticEvent, mSessionMetadata.getMetadataForEvent()); mMessages.eventsMessage(eventDescription); if (null != mTrackingDebug) { mTrackingDebug.reportTrack(eventName); } } catch (final JSONException e) { MPLog.e(LOGTAG, "Exception tracking event " + eventName, e); } }