Connecting to Google Analytics AP
This document goes over the process required to create an API connection to Google Analytics. This process will flow from initializing the API connection to creating a job in the ETL tool that transfers that API data into a database table/data source, to adding a chart connecting to that data source.
If you don't have a developer account go here:https://console.developers.google.com/ to create one.
Once you create a developer account you will see a screen like the one below. At this screen you will:
Click on Select a project
This screen will pop up and you will click on NEW PROJECT
Your screen will now look as shown in the picture below. You will then type in the box Project name.
After choosing a project name you will then click the CREATE button.
Your screen will now look as shown in the picture below. You will then click:
+Enable APIS AND SERVICES.
Your screen will now look as shown in the picture below. At this time you will type in the search box Google Analytics API and then hit the enter button on your keyboard.
Once you have done that your screen will look as shown below. Please check that your search matches the one below and click on the Google Analytics API.
At this time your screen will now look as shown in the picture below. Here you will click the ENABLE button.
Your screen will now look as shown in the picture below.
Here you will click the: CREATE CREDENTIALS button.
Now at this screen you will click the Cancel button,
Which then brings you to the following screen where you click Create credentials.
In this drop down menu you will select OAuth client ID
You will be taken to the following screen where you will click the Configure consent screen button.
Now your screen will look as shown below ONLY enter the Application name in the box provided, then scroll down and click the Save button.
At this next screen where it says Application type click the Web application button, then the Create button.
The screen will then expand to the following depicted below. Where it has the box for Authorized redirect URIs you will enter the Redirect URL from your Data Hub website.
If you do not know where to find the Redirect URL please open a NEW tab in your web browser and log into your Data Hub website and click on System to expand the drop down menu.
Then in the open System drop down menu click API Accounts.
Your screen will now look like this, click on the Add Account button in blue on the left.
This Add Account box will pop up and you will click on Google Analytics and then click the Next button.
That box will disappear and a new Add Account pop up will appear with OAuth2 Configuration. Where you see the Redirect URL click the Copy button.
You will now go back to your Google Analytics tab in your web browser and where it has the box for Authorized redirect URIs you will enter the Redirect URL from your Data Hub website that you just copied. Now click the blue Create button at the bottom of the page.
Your screen will now look like this: Here you will copy your client ID go back to to the open Data Hub tab and paste it where it says Client ID. If it has anything in the box delete it before pasting the Client ID into the box.
Again this is what your Data Hub should look like and where you paste the Client ID and Client Secret. Once you have the Client ID pasted into the box, then go back to the Google Analytics tab and copy the Client Secret into the box.
Your screen will now look similar to mine below and you can now click the blue Log in button.
It will then prompt you to log into the Google Analytics site. After logging into the site if you have strict network settings you may see the following message below click where it says Advanced.
It will then expand, and click on Go to iDashboards Data Hub (unsafe)
Once you see this screen you will be successfully connected to your Google Analytics account through your iDashboards Data Hub.
Once that box disappears your screen will now look like this and you can begin using your Google Analytics data on your new HTML5 iDashboards. At this time you can close out of your Google Analytics tab and only use your Data Hub.
Creating Data Sets from Your Connection
Now you can create a data set from you Google Analytics account by clicking on Data Sets so the menu drops down.
Then select New Data Set
Then click on Cloud API
Now you will see this screen, if you have other API connections they will show up here, either way select Google Analytics and click the blue Add Account button.
You can then configure the data, parameters and filters you'd like to use on this screen:
Once you have that put in you can click Save and move on to the next screen where you can move the columns around if they are not in the correct order then click Save As. Once you have it saved you can close out of this, as your data set is now created.
Creating an ETL Job
You will now be on the Data Hub Lobby screen. From here you can select the +NEW ETL JOB icon.
What is an ETL job?
E - Extract Data from your source
T - Transform Data (make changes)
L - Load Data (Place into a target table)
Here are the various types of transformations available:
Now looking back at the previous picture if you Click and Drag the E, T, and L you can set up your ETL job.
Once you click on the E to Extract your data, you get the Extract Data (1) box. When you hoover your mouse over it you get the gear on the left (configure the task), the up arrow in the middle to send your data to be transformed (T) or loaded (L). If you do not have any transformations that need to be done, you can pull down the L box and connect the E and L with the up arrow by dragging it from the E to the L box.
Connecting the E and L are as shown below, doing so allows your data to be used to make dashboards, charts and picklists.
Known Issues with Google Analytics: v9.7e will not connect.
Please see: v9.7f Enterprise Release Notes
If you are running on software below v9.7f please contact support for assistance in upgrading.