package de.metalmatze.krautreporter.helpers;

import android.content.Context;

import com.mixpanel.android.mpmetrics.MixpanelAPI;

import de.metalmatze.krautreporter.R;

public class Mixpanel {

    public static MixpanelAPI getInstance(Context context) {
        return MixpanelAPI.getInstance(context, context.getString(R.string.mixpanel_token));
    }

}

@@ -124,16 +124,64 @@
 elAPI;%0A%0A
+import de.metalmatze.krautreporter.BuildConfig;%0A
 import d
@@ -210,16 +210,16 @@
 rter.R;%0A
-
 %0Apublic 
@@ -301,16 +301,17 @@
 ) %7B%0A
+%0A
         
 retu
@@ -310,47 +310,22 @@
     
-return MixpanelAPI.getInstance(context,
+String token =
  con
@@ -363,16 +363,191 @@
 l_token)
+;%0A%0A        if (BuildConfig.DEBUG) %7B%0A            token = %22435f4592acdcafa38ea5378f5b1d4d77%22; // md5(%22mixpanel%22)%0A        %7D%0A%0A        return MixpanelAPI.getInstance(context, token
 );%0A    %7D

Use not a real token for mixpanel if debugging