Google Analytics Credentials

How to obtain the credentials to communicate with Google Analytics

1. You must have a Google Analytics account. To sign up, go to: http://www.google.com/analytics/

Get credential follow the steps









2. Setup

2.1. Developers Console project

You need to create or use an existing project in the Google Developers Console as a first step.

Go to https://console.developers.google.com/project and sign into your Google/Gmail account.

Once signed in, you'll see a list of existing projects (if there are any) or you can click Create project to create a new one.


2.2. Enable the Analytics API

Then click the menu button in the top-left corner of the Developers Console, expand APIs & Services and click Library.


Ensure the correct project is selected at the top-left of the screen. Scroll down and click the Google Analytics API tile.


Click Enable to enable the Google Analytics API.


2.3. Service account credentials

This section shows you how to generate Service account credentials which will allow to access your Google Analytics data.

From the left navigation, click Credentials. Click Create credentials and select the Service account option.


Enter a name and a role for the account.

Enter a name and a role for the account.

When done, record the service account email address. Copy this from the account details and paste it somewhere to refer to later such as a Notepad app on your computer.


Next, add a new key for the service account. For example, click to edit the service account and click Add Key. Choose a JSON key type.

When finished, a certificate file should be downloaded.

2.4. Authorization

Now that the client credentials have been generated, sign into your Google Analytics account in order to give authorization to these credentials.

Go to the Admin area and click User Management.


In the Add permissions box, enter or paste the service account email address that you recorded earlier. Then click Add.