<div dir="ltr"><div>Hi LRUG,</div><div><br></div><div>Thanks very much for listening to my A/B testing talk on Monday.</div><div><br></div><div>I said I'd follow up to the list with some of the tools we used for the experiment, logging and analysis.</div><div><br></div><div><b>Running the test</b></div><div><br></div><div>The A/B testing gem we use is called <a href="http://github.com/assaf/vanity" target="_blank">vanity</a>, and the other main (and slightly more widely-used) gem for rails apps is <a href="http://github.com/splitrb/split" target="_blank">split</a>. We've lightly modified vanity to support logging the A/B test assignments - at the moment this code is pretty specific to our app, though.</div><div><br></div><div>The gem we use for event logging is <a href="https://github.com/ankane/ahoy" target="_blank">ahoy</a> (gem name: ahoy_matey). It's great, and I would immediately add it or something like it to every app I work on in future. (See also: <a href="https://github.com/roidrage/lograge">lograge</a>, which one-json-blob-per-request-ifies your rails logs.)</div><div><br></div><div>The logs are aggregated using <a href="http://www.fluentd.org/" target="_blank">fluentd</a> and stored in S3 (as well as being sent to loggly for live querying). We're now also importing them into <a href="http://docs.aws.amazon.com/redshift/latest/mgmt/welcome.html" target="_blank">Amazon Redshift</a>.<br></div><div><br></div><div><b>Test analysis</b></div><div><br></div><div>After downloading the logs for the relevant date range we wrote a makefile that used:</div><div><ul><li><a href="https://stedolan.github.io/jq/" target="_blank">jq</a> to filter the events and flatten them into a single csv per event type with the important fields<br></li><li><a href="https://sqlite.org/" target="_blank">sqlite3</a> to import these CSVs as tables and do the joins required to match the events, emitting a one-line-per-participant csv with the conversion info</li><li><a href="http://www.wizardmac.com/" target="_blank">wizard</a> to pivot the resulting csv into the final tallies (it also lets you create fancier models for your results if you're inclined to, e.g. controlling for variables)</li></ul><div>jq in particular is a great tool if you have a stream of JSON objects to process. Wizard is nice too (well worth the price I think) and lets me pretend to be a data scientist occasionally, with only minimal grumbling from the real experts.</div><div><br></div>I mentioned Redshift - this lets us put our events in a big postgres instance, replacing the download + jq + sqlite3 steps above with a single SQL query. This is pretty cool IMO, not least because downloading gigabytes of logfiles over office wifi tends to make your colleagues cranky.</div><div><br></div><div>Anyway, enough from me about logs. See you in January. :-)</div><div><br></div><div>Cheers,</div><div>Simon</div></div>