Skip to content

Commit

Permalink
fix #1713: add package version code to mixpanel properties
Browse files Browse the repository at this point in the history
  • Loading branch information
maxme committed Aug 20, 2014
1 parent a37c664 commit 7717425
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.wordpress.android.BuildConfig;
import org.wordpress.android.WordPress;
import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.PackageUtils;

import java.util.EnumMap;
import java.util.Iterator;
Expand All @@ -29,6 +30,9 @@ public class AnalyticsTrackerMixpanel implements AnalyticsTracker.Tracker {
private static final String DOTCOM_USER = "dotcom_user";
private static final String JETPACK_USER = "jetpack_user";
private static final String MIXPANEL_NUMBER_OF_BLOGS = "number_of_blogs";
private static final String VERSION_CODE = "version_code";



public AnalyticsTrackerMixpanel() {
mAggregatedProperties = new EnumMap<AnalyticsTracker.Stat, JSONObject>(AnalyticsTracker.Stat.class);
Expand Down Expand Up @@ -170,6 +174,7 @@ public void refreshMetadata() {
properties.put(DOTCOM_USER, connected);
properties.put(JETPACK_USER, jetpackUser);
properties.put(MIXPANEL_NUMBER_OF_BLOGS, numBlogs);
properties.put(VERSION_CODE, PackageUtils.getVersionCode(WordPress.getContext()));
mMixpanel.registerSuperProperties(properties);
} catch (JSONException e) {
AppLog.e(AppLog.T.UTILS, e);
Expand Down

0 comments on commit 7717425

Please sign in to comment.