Skip to content

Commit 1adc4f3

Browse files
committed
Update user properties before tracking the event.
1 parent bcc796d commit 1adc4f3

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,15 @@ public void refreshMetadata(boolean isUserConnected, boolean isWordPressComUser,
463463
return;
464464
}
465465

466+
try {
467+
JSONObject properties = new JSONObject();
468+
properties.put(JETPACK_USER, isJetpackUser);
469+
properties.put(NUMBER_OF_BLOGS, numBlogs);
470+
mNosaraClient.registerUserProperties(properties);
471+
} catch (JSONException e) {
472+
AppLog.e(AppLog.T.UTILS, e);
473+
}
474+
466475
if (isUserConnected && isWordPressComUser) {
467476
setWordPressComUserName(username);
468477
// Re-unify the user
@@ -478,14 +487,7 @@ public void refreshMetadata(boolean isUserConnected, boolean isWordPressComUser,
478487
}
479488
}
480489

481-
try {
482-
JSONObject properties = new JSONObject();
483-
properties.put(JETPACK_USER, isJetpackUser);
484-
properties.put(NUMBER_OF_BLOGS, numBlogs);
485-
mNosaraClient.registerUserProperties(properties);
486-
} catch (JSONException e) {
487-
AppLog.e(AppLog.T.UTILS, e);
488-
}
490+
489491
}
490492

491493

0 commit comments

Comments
 (0)