This repository demonstrate how to use SendGrid's categories and statistics endpoint to run A/B tests. You can use this app on Heroku, to analyze your own tests, the only requirement being you setup categories for each variable you wish to test.
The business code of this app is really found in index.html, which does all the computation and makes all the requests. The server in this app, is only used to guarantee HTTPS and proxy SendGrid's Stats Endpoint, so it can be accessed by Javascript.
Further explanation of this app and its methods can be found in A/B Testing Explained and Used in Transactional Email on the SendGrid Blog.