Create API Project and add Service Account
- Go to https://code.google.com/apis/console/ and, if necessary, create a new project.
- Switch on Analytics API.
- Go to API Access.
- Create an OAuth 2.0 client ID.
- Enter product name.
- Select service account.
- Download key file.
After successful creation of the Client ID for a service account, the account will be displayed in on the Credentials sub page from APIS & AUTH.
- Place key somewhere: either you can place the key in the server directory and then enter the path in GUI, or you can just paste the complete key in the Key field in the GUI.
Ensure permissions for the service account
- Navigate to API Project -> Permissions and check that the service account of the project has write permissions.
Alternatively, you can give enhanced permissions as described in http://www.e-nor.com/blog/web-analytics/enhanced-google-analytics-admin-access-and-user-permissions(in the simplest case, just give the service account admin rights to the analytics account).
Add Analytics Data Source to datavirtuality Server
- Add a data source as usual and select Google Analytics from the dialogue.
Enter all necessary information into gui as seen below: