Skip to main content

Google Analytics

This article was last updated by on January 12th, 2018 in Data API | Applicable for versions: 2.1, 2.2, 2.3, 2.4, 2.5
(Last Updated On: January 12, 2018)

Visualr can fetch the stored data from Google Analytics web API’s. Google provides a definite set of measures and dimensions, the user just needs to provide the specific Google ID and a secret key file that can be obtained from the Google Analytics website. This Data Provider allows a maximum of ten dimensions and seven measures to be assigned for data visualization in a single report. If you want to use other dimensions and measures beyond this limit, you have to add the same Data Provider with a different name, dimensions and measures.


Google Analytics Setup Instructions: 

1. Creating Service Account for accessing Google APIs

a. Login to
b. If there is no project then:
1. Go to All Projects -> Create Project -> Enter name -> Click on create.
2. Go to Library -> Other popular APIs -> Analytics API -> Click on enable.
c. Go to Product & Services -> IM & Admin -> Service Accounts -> Create Service Account
d. Enter Service Account Name. Grant Role as Project Viewer. Grant more role only if needed.
e. Select Furnish a new private key, Select key type as JSON.
f. Click on Create and it will save the private key of service account on the computer.
g. Keep a note of Service Account ID, it will be used later.
h. Keep private key file handy to be used in Visualr – Data API – Google Analytics setup.

2. Providing access to service account on Google Analytics Account
a. Go to
b.If there is no account then fill the form:
c. Click on Admin tab and select google analytics account on which you want to grant access to service account.
d. Keep a note of the last 9 digits of the URL, it will be used as profile id later.
e. Click on User Management, enter the Service Account ID, grant -> Edit, Collaborate, Read & Analyze permission. Grant more permission only if needed.
f. Click on Add.

3. Creating Data API in Visualr
a. Login to Visualr.
b. Go to Data API – Google Analytics.
c. Click on New Icon (Plus Sign).
d. Enter name, profile id (copied during step 2), browse .json file containing private key (downloaded during step 1), select date.
e. Select dimentions and measures.
f. Click on Save Icon (Tick Sign).
g. Use Data API in Query Builder and visualize the data.