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.

1. Get Your Free JustReact Copy

Get Your Free Justreact CopyGet 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.

Get Your FREE JustReact Copy

Make your own JustReact CopyMake your own JustReact Copy
Click the Make a copy button to create your own JustReact copy.

The JustReact copy is now available in your account
The JustReact copy is done and a new Menu appears in the top menu.

2. Authorize the JustReact Library

Authorize the JustReact LibraryAuthorize the JustReact Library
Click Help Me option in the JustReact menu to authorize the JustReact Library

Justreact AuthorizeJustreact Authorize
Click the Continue button to authorize the JustReact Library.

Justreact Authorize AccountJustreact Authorize Account
Select the account you want to use with JustReact

Justreact Authorize Allow AccessJustreact Authorize Allow Access
Allow JustReact access by clicking the Allow button.

3. Setup The Google Analytics API Connections

Justreact Script EditorJustreact Script Editor

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.

Justreact Script Advanced Google ServicesJustreact Script Advanced Google Services

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.

Justreact Script Google Api ConsoleJustreact Script Google Api Console
Enable the Google Analytics API & Google Analytics Reporting API (1) and click the Google Cloud Platform API Dashboard (2) link.

Justreact Script Google Api Console SearchJustreact Script Google Api Console Search

Search for Analytics.

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

Justreact Script Enable Google Analytics ApiJustreact Script Enable Google Analytics Api

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

Google Analytics Reporting Api CredentialsGoogle Analytics Reporting Api Credentials

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.

Create Analytics Reporting Api CredentialsCreate Analytics Reporting Api Credentials

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

Add Credentials To ProjectAdd Credentials To Project

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.

Add Credentials To Project 2Add Credentials To Project 2

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.

Create Oauth Client IdCreate Oauth Client Id

For new credentials, you'll need to

  1. select Web application
  2. set a name for the project
  3. fill in the Authorized redirect URl:

Oauth Client IdOauth Client Id

Now your credentials are ready for your project

  1. client ID
  2. client secrect

You need to copy these to your project.

Client Id Secret Google ScriptClient Id Secret Google Script

Paste the client ID and client secret in the first tab ( of your JustReact Library.

4. How to view your Google Analytics IDs

Show Google Analytics IdsShow 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.

Sidebar Google Analytics IdsSidebar Google Analytics Ids

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

Open Google Script EditorOpen Google Script Editor
  1. Copy the Google Analytics ID, you want to use for your query
  2. Open the Script editor in the Tools menu

Google Script GetGaData FunctionGoogle Script GetGaData Function

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.

Google Script Getvars FunctionGoogle Script Getvars Function

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.

Google Analytics Metrics Dimensions ExplorerGoogle Analytics Metrics Dimensions Explorer

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

Google Script Update AnalyticsGoogle Script Update Analytics

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 Google Script EditorOpen Google Script Editor

Open the Script editor.

Email GraphsEmail Graphs

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 = "info@xxxxxx"

Email Graphs MenuEmail Graphs Menu

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

Graphs EmailGraphs Email

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 Google Script EditorOpen Google Script Editor

Open the Script editor.

Email Report FunctionEmail Report Function

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
if (onUpdate_("Dashboard", "F19")==1) { emailReport_(eSet); } => This means that the email will only be sent if cell F19 on sheet "Dashboard" has changed since last time. If you want to send it every time, change it to: emailReport_(eSet);

Email Report SheetEmail Report Sheet

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]

Email Report MenuEmail Report Menu

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.

Email Report

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 Google Script EditorOpen Google Script Editor

Open the Script editor.

Project TriggersProject Triggers

Click the clock button to open the script triggers screen.

Add Project TriggerAdd Project Trigger

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

Add Trigger Justreact LibraryAdd Trigger Justreact Library
  1. Select the function you want to run
  2. Select Time-driven as event source
  3. Select the time type for the trigger
  4. Select the interval

You now have a Google Analytics reporting system on autopilot!

Get A FREE Quote Now

Need help setting up your Google script?
Or do you want us to handle your script?

Get in touch with us below and
we'll get back to you asap.


Please type your full name.
Invalid email address.
Invalid Input
Invalid Input
© 2018 JustReact - The Nederlands