How To Make Your Own Google Analytics Dashboard

Are you spending too much time, getting the right information from Google Analytics, to be able to make the right business decisions?
And would you like to have an automated solution that generates your custom Google Analytics report, with year-to-date, month-to-date or forecast information and sends it at the time you need it?
Well, than I've got good news for you!
In about 5 minutes, you will have your own, free, Google Analytics dashboard.
Just follow these easy steps.
- Get Your Free JustReact Copy
- Authorize the JustReact Library
- Setup The Google Analytics API Connections
- How to view your Google Analytics IDs
- How to setup your first Google Analytics Query
- How to get your Google Sheet graphs by email
- How to email your Google Analytics report
- How to schedule your Google scripts
1. Get Your Free JustReact Copy
To get started with JustReact, you first need to get a copy of the JustReact Google Sheet.
Make sure you are logged in with your Google Account and click the button below.



2. Authorize the JustReact Library








3. Setup The Google Analytics API Connections


To get information from Google Analytics, we need to connect to the Google Analytics API and Google Analytics Reporting API.
To do this, click the Script editor option in the Tools menu.


To connect to your Google Analytics account(s) you need to enable the Google Analytics API.
Click the Advanced Google Services option in het Recourses menu.




Search for Analytics.
Both the Analytics API (1) and the Google Analytics Reporting API (2) need to be enabled.


Click the ENABLE button for both API's to enable them for your JustReact project.


To use the Google Analytics Reporting API, you also need credentials.
These credentials, you will need to copy to your script later.
Click the Create Credentials button at the top right.


Choose Google Analytics Reporting API at step 1 and click the What credentials do I need? button.


Select Web browser (Javasript) as the context you'll be calling the API from.
Select User data as the type of data that you request.


If you already have credentials, you wil see this screen.
You can also click the Create a new client ID link to make new credentials.


For new credentials, you'll need to
- select Web application
- set a name for the project
- fill in the Authorized redirect URl: https://script.google.com/oauthcallback


Now your credentials are ready for your project
- client ID
- client secrect
You need to copy these to your project.


Paste the client ID and client secret in the first tab (Code.gs) of your JustReact Library.
4. How to view your Google Analytics IDs


To show your available Google Analytics IDs, click the show analytics IDs option in the JustReact menu.
The first time, it takes a little bit longer. The Google Analytics IDs will be cached for 3 hours.


You can now see the available Google Analytics IDs in the sidebar at the right side.
You need these IDs to get data from the Google Analytics API.
5. How to setup your first Google Analytics Query


- Copy the Google Analytics ID, you want to use for your query
- Open the Script editor in the Tools menu


To setup the Google Analytics queries, go and edit the getGaData() function.
Each row is for a different sheet.
So if you want more Google Analytics Queries, just copy the row and change the sheetName.
Change sheetName = "Visits 2018" to the name of the sheet you want.


This is the tricky part!
If this is your first time, using Google script, just edit vars["sheetName"] = "Visits 2018" and vars["viewId"] = 'ga:XXXXXXXX' and run the function.
If you have any questions about this, please use our forum.


If you want to know what Metrics & Dimensions are available, visit the Google Metrics & Dimensions Explorer


If your ready with your queries, you can go ahead and click the Update Analytics option in the JustReact menu.
6. How to get your Google Sheet graphs by email


Open the Script editor.


Edit the emailGraphs() function. Choose the source sheet for the Graphs: eSet.sheetName = "Dashboard" and change the emails you want to send the graphs to: eSet.emails = "[email protected]"


To send the graphs to your email, click the Email Graphs option in the JustReact menu.


The "Graphs" email contains the graph images from the source sheet and also the code you can use in your report email.
The graph codes look like {G:0, H:600, W:1200}, where G is the graph number (starting at 0), H is the height of the image in pixels and W is the width in pixels
7. How to email your Google Analytics report


Open the Script editor.


The emailReport() function contains the parameters for sending the Google Analytics report by email.
- pdfSheet =>The PDF report for the email
- reportSheet: The XLS report for the email
- graphSheet: The graphs for the email
- emailSheet: The HTML code for the email
- emails: Fill in the emails (comma separated) that should receive the report
- var d = "YY-MM-DD hh:mm:ss"
Date/time format for the email subject - emailSubject: Email subject


This sheet contains the HTML code for the email.
The HTML is build from the top left to the bottom right.
So A1, A2, A3, ......E1000, F1000, etc.
If you want to add a graph, use the {G0; H:600; W:1200} format.
To add a link to the PDF or XLS report, you can use [PDF] or [XLS]


If your email is ready, you can click the Email Report option in the JustReact menu, and the report will be in your inbox within a few seconds.

Now you received the Google Analytics report by email, you can use the info to improve you site or webshop.
No need to spend hours on future reports. You JustReact :-)
8. How to schedule your Google scripts


Open the Script editor.


Click the clock button to open the script triggers screen.


Click the Add Trigger button to add a trigger to the project.


- Select the function you want to run
- Select Time-driven as event source
- Select the time type for the trigger
- Select the interval
You now have a Google Analytics reporting system on autopilot!