##1. Basic Setup
Create a Project in the Google APIs Console: https://code.google.com/apis/console/
Enable the Analytics API under Services
Under API Access: Create an Oauth 2.0 Client-ID
Give a Product-Name, choose Web Application or Service Account depending on your needs
Web Application: Set a redirect-uri in the project which points to your apps url
Service Account: Download the private key (.p12 file)