I am using mixpanel for event tracking on iOS. I want to get started on using AB testing.
Say X% of user gets shown an alert, as bucket 1; and Y% of user doesn't get the alert, as bucket 2;
Below is a sample code that I tried to use MPTweakValue to achieve the bucket assignment:
#import "Mixpanel/MPTweakInline.h"
...
int bucketId = MPTweakValue(@"bucket", 1);
if (bucketId == 1) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Welcome to Sample App" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Confirm", nil];
[alert show];
} else {
//do nothing;
}
I want to get every logic in code (the AB testing page on Mixpanel webpage is confusing to me since it focuses on UI change).
I cannot find anywhere from mixpanel to tweak the value for different users, where did I do wrong? Should I use something else to assign bucket instead of using MPTweakValue?