From ed7d7b0412f5411d71d39666c423691133b7d587 Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Wed, 11 Feb 2015 13:57:28 -0800 Subject: [PATCH] Mixpanel gem prompt a/b test script Investigating some weirdness where no-prompt group is 50% larger than prompt group. True in Mixpanel and in our internal analytics. --- scripts/analytics/mixpanelABGemPrompt.py | 122 ++++++++++++++++++ .../mongodb/queries/abGemPromptGroup.js | 3 + 2 files changed, 125 insertions(+) create mode 100644 scripts/analytics/mixpanelABGemPrompt.py diff --git a/scripts/analytics/mixpanelABGemPrompt.py b/scripts/analytics/mixpanelABGemPrompt.py new file mode 100644 index 000000000..43682f4ea --- /dev/null +++ b/scripts/analytics/mixpanelABGemPrompt.py @@ -0,0 +1,122 @@ +# Calculate gem prompt A/B test results + +# TODO: Why is no-prompt group 50% larger? + +import sys +from mixpanel import Mixpanel + +try: + import json +except ImportError: + import simplejson as json + +# NOTE: mixpanel dates are by day and inclusive +# E.g. '2014-12-08' is any date that day, up to 2014-12-09 12am + +if __name__ == '__main__': + if not len(sys.argv) is 3: + print "Script format: