Skip to content

Commit

Permalink
Update user properties before tracking the event.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloercoli committed Dec 10, 2015
1 parent 213467b commit d5584c6
Showing 1 changed file with 10 additions and 8 deletions.
Expand Up @@ -463,6 +463,15 @@ public void refreshMetadata(boolean isUserConnected, boolean isWordPressComUser,
return;
}

try {
JSONObject properties = new JSONObject();
properties.put(JETPACK_USER, isJetpackUser);
properties.put(NUMBER_OF_BLOGS, numBlogs);
mNosaraClient.registerUserProperties(properties);
} catch (JSONException e) {
AppLog.e(AppLog.T.UTILS, e);
}

if (isUserConnected && isWordPressComUser) {
setWordPressComUserName(username);
// Re-unify the user
Expand All @@ -478,14 +487,7 @@ public void refreshMetadata(boolean isUserConnected, boolean isWordPressComUser,
}
}

try {
JSONObject properties = new JSONObject();
properties.put(JETPACK_USER, isJetpackUser);
properties.put(NUMBER_OF_BLOGS, numBlogs);
mNosaraClient.registerUserProperties(properties);
} catch (JSONException e) {
AppLog.e(AppLog.T.UTILS, e);
}

}


Expand Down

0 comments on commit d5584c6

Please sign in to comment.