WIP: analytics v2 support
Updated to support either version of analytics:
For version 2 you will need to follow the setup instructions for the json file here: https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-php