In this post, I will show you how we enable the google analytics and how to get the key for authentication. We are going to see some few steps on google analytics api how we can get authentication, submit the request and parsing the response. The response which is parsed is displayed in the form of graphical on itechsaas cms dashboard. To keep things simple and usable, I am going to walk you through step by step.

Step1: Create New Project

Go to https://console.developers.google.com/apis/dashboard and create a new project.

itechsaas cms google analytics step1

itechsaas cms google analytis step2

Step 2: How We Can Enable APIs and Services?

- Select your project and click on "ENABLE APIS AND SERVICES":

itechsaas cms google analytics step 3

Step 3: Enable API

itechsaas cms google analytics step 4

itechsaas cms google analytics enable api

Step 4: Role Viewer

Generate service account key and select role Viewer

 select role Viewer

Itechsaas service credentials

Step 5: Read JSON Content

Open JSON file and copy its content, then go to /admin/settings and update JSON credentials data for Analytics plugin:

itechsaas cms google analytics json

Step 6: Getting View ID

- Go to Google Analytics account: https://analytics.google.com/analytics/web/ . Click on "Admin" => "View Settings" and copy "View ID" number, then go to /admin/settings/general and tab "Google Analytics" and paste to field View ID.

itechsaas google analytics settings viewId

itechsaas cms google analytics account permission

itechsaas cms google analytics add permission

Good Luck !