Skip to content

Commit

Permalink
add millisecond precison to event tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
zihejia committed Jun 24, 2022
1 parent 79f98e2 commit 7456343
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2157,11 +2157,10 @@ protected void track(String eventName, JSONObject properties, boolean isAutomati
// Don't allow super properties or referral properties to override these fields,
// but DO allow the caller to override them in their given properties.
final double timeSecondsDouble = (System.currentTimeMillis()) / 1000.0;
final long timeSeconds = (long) timeSecondsDouble;
final String distinctId = getDistinctId();
final String anonymousId = getAnonymousId();
final String userId = getUserId();
messageProps.put("time", timeSeconds);
messageProps.put("time", System.currentTimeMillis());
messageProps.put("distinct_id", distinctId);
messageProps.put("$had_persisted_distinct_id", mPersistentIdentity.getHadPersistedDistinctId());
if(anonymousId != null) {
Expand Down

0 comments on commit 7456343

Please sign in to comment.