Google Analytics dashboards
- Last Modified:
- 14 Dec 2018
- User Level:
In TERMINALFOUR you can use analytics to collect data about traffic to your site, conversion rate, types of visitors, bounce rate and other things. This allows you to measure and analyze the impact of your content so you can improve the effectiveness of your site.
The Analytics Dashboards are context-specific, and the reports are based on "Views" from Google Analytics. All configuration is handled by TERMINALFOUR administrators. Group rights are used to determine who can view the various dashboards.
There are four main steps when creating Dashboards:
Authorize Google Analytics Account API
First, go to System Administration > System Settings > Analytics:
If you haven’t already linked a Google Analytics account to TERMINALFOUR, select Analytics Account:
From the next screen, select Create New Account:
You'll need the Google API details to authenticate the account. Go to the Google API Console and create a new project specifically to use the Analytics API with TERMINALFOUR:
Give your project a meaningful name that you can recognize (this is especially important if you have more than one Project):
When you've created the Project, select Enable APIs and Services:
Searching for analytics will return some results. Select Analytics API (not the Google Analytics Reporting API):
To get started with the API you’ll have to Create Credentials to use with it:
Next up, you’ll need to specify how you will be calling the API and the type of data you intend to access:
Next, you’ll be creating an OAuth2 Client ID to authorize the use of API with URLs from your TERMINALFOUR instance:
Here are some suggestions of what you could add here:
|Name||The name of the Client ID|
The Base URL for your TERMINALFOUR instance.
This is the IP address or hostname where API requests originate. Usually, this is the TERMINALFOUR server IP address or hostname.e.g. if you log into TERMINALFOUR at https://www.t4university.com/terminalfour/login.jsp
then enter https://www.t4university.com into this field
|Authorized redirect URIs||
Just copy the Redirect URL from the Create Site Analytics screen in TERMINALFOUR.
This is the location your browser will be redirected to when authorization is successful.
The authorization information will be passed to this location and saved on the TERMINALFOUR CMS server; this is usually the TERMINALFOUR context_url found in General Settings with gaOAuthCallback appended to it (case sensitive).
Google Analytics requires an absolute URL so your Redirect URL cannot be relative.
In the next step, select add the Product name. Your mail should already be filled in:
Once you've created the credentials are created, you can select its name from the list that appears:
From the next screen, you’ll see the Client ID and Client Secret that you will require to complete the analytics account set up.
Just copy and paste both into the input boxes in TERMINALFOUR:
Make the account and product names recognizable to you and others in your organization.
After you’ve saved your changes, you will have to authorize account. Just select the Actions menu and choose Authorize:
Then, select Allow from the pop-up that will appear. The requesting domain will differ from the one here:
When authorized, the status will be updated:
Now that your account is set up, it’s time to set up your Dashboards.
Each TERMINALFOUR instance comes with a sample Dashboard. In this example, we are going to use that as our starting point.
In System Administration > System Settings > Analytics you will see a list of existing Dashboards. If you haven’t created any others, the only one you’ll notice is ‘Sample dashboards with useful reports’. From the Actions menu select Edit Dashboard:
You’ll need to do a couple of things here. First up, link the Google Analytics account you’ve linked with your TERMINALFOUR installation to the dashboard.
Click on Select Account and choose the analytics you’ve just set up:
Create Dashboard with Account and View ID
Next up, you are going to need the Google Analytics View ID. A ‘View’ is essentially the data from a particular site and while a View can be filtered, so it only includes some of the data, the default that Google Analytics creates is unfiltered. That’s the one we are going to use.
This article on how a Google Analytics account is organized will give you a little more detail on some of the terms, like Property and View, which are used in Google Analytics.
Go to Google Analytics. You should already be logged in with the same Google account that you used to set up the API and select Admin:
Make sure that you have the right Property (website to track) selected and select View Settings:
Copy the View ID:
Paste it into the View ID box in the Analytics settings:
Enable the Dashboard and choose Save Changes:
On this screen, you can also specify the Groups who can view the Dashboard.
View your Dashboard
To view your Dashboard go to Measure > Performance Dashboards > Site Analytics:
You can change the order of Reports by clicking and dragging the Move icon from the Order column of each Report. Reports can be deleted and edited via the Actions menu on the right:
Each Report can be based on some or all of the following options:
A Query Explorer is available here so you can try out your queries beforehand.
Determines the size of the widget on the user's Dashboard.
Used to describe data. A dimension for a geographic location could have dimensions called Latitude, Longitude, or City Name. Values for the City Name dimension could be Boston, Dublin, or Sydney.
Individual elements of a dimension that can be measured as a sum or a ratio. For example, the dimension City can be associated with a metric like Population, which would have a sum value of all the residents of the specific city. Screenviews, Page per Session and Average Session Duration are examples of metrics in Google Analytics.
Helps you to focus on specific elements of your traffic. As an example, you can focus on users from a particular country, from a specific campaign, who visit during a particular hour of the day, etc.
Limits the data that is included in a view. For example, you can use filters to exclude traffic from particular IP addresses, focus on a specific subdomain or directory, or convert dynamic page URLs into readable text strings. Google Analytics supports two main kinds of filters: predefined and custom.
For information on how to create filters, check the Google documentation.
|Sort||The order and direction to retrieve the results. Can have multiple Dimensions and Metrics.
|Date range||Select the fixed date range if you want to set a start date and end date. Alternatively, select the variable date range and set the interval|
|Start index||If your result set contains 50 values, you can opt to start the index at 20 to ignore the first 20 values.|
|Max results||Specify the maximum results to output|
|Results data||Choose to clean up labels returned from the analytics service.|
Display returned data as a pie chart or line chart.
Below you can see a sample Report measuring mobile traffic to a site.
This query returns information about sessions which occurred from mobile devices. Note that "Mobile Traffic" is defined using the default segment ID -14:
Direct Edit Integration
Once a Dashboard is displaying correctly it can be associated with a Channel.
When the Dashboard is associated with a Channel, the analytics will display in Direct Edit. The results are based on the Section path and displays like so:
- Last Modified:
- 14 Dec 2018
- User Level:
In TERMINALFOUR you can use analytics to collect data about traffic to your site, conversation rate, types of visitors, bounce rate and many other things. This allows you to measure and analyze the impact of your web data so you can improve the effectiveness of your site.
The analytics dashboards are context specific, and the reports are based on "views" from Google Analytics. All configuration is handled by TERMINALFOUR administrators. Group rights are used to determine who can view the various dashboards.
In this section you can read about the following topics:
In order to use Analytics in TERMINALFOUR, you need one or more accounts in Google Analytics as well as one or more accounts in TERMINALFOUR.
In Google Analytics, an account is linked to one or more web properties (sites). A web property is a domain where you track information, such as www.terminalfour.com. Each web property has views; views contain the data you've collected and can be filtered for analysis. Each view has an ID, and you'll need this ID when setting up dashboards in TERMINALFOUR.
You also need one or multiple accounts in TERMINALFOUR. These accounts have no linked web properties, and views are referred to as dashboards. The dashboards are created based on the IDs you get from the Google Analytics views. In reality, each dashboard is a graphical representation of a view, and each dashboard can have reports attached.
Add account (Google)
- Ensure you already have a Google Analytics account, as you'll need to use that.
- Open the Google Developers Console and log in.
- Ensure the Analytics API is turned on.
You are now ready to create a new project. Make a note of the name, as you'll need it later.
- Go to the project's Credentials and click Create new Client ID.
- Set the Application Type as Web application.
You need an Authorized Redirect URI, but you won't have that until you've set up the corresponding account in TERMINALFOUR, so leave the default value there to be updated later.
Once you've saved the account, you'll have the details needed to set up an account in TERMINALFOUR, i.e. Client ID, Client secret and Product name.
Add account (TERMINALFOUR)
- To add an account go to: System Administration -> System settings -> Analytics -> Analytics accounts -> Create new account
- Fill in the Name and Description for the new account.
- Copy the Client ID and Client secret from the account you have created in Google Analytics.
- In the Product name you need to enter the project's name from the account you have created in Google Analytics.
- Redirect URL is created by TERMINALFOUR and needs to be entered in the settings for the Client ID in Google Analytics.
- Click Save changes.
- Now you can authorise your account in TERMINALFOUR. To do that, click Grant access.
- A Google screen will open, asking you to accept that you're granting access.
- Make sure to click Save changes once the account has authorised.
An Analytics dashboard in TERMINALFOUR is a graphical representation of a view from Google Analytics.
- To create a new dashboard, go to the Configure dashboards screen and click Create dashboard.
- Enter a Name and Description for your dashboard.
- Click Select account to bring up a list of the Google accounts you have configured. Select the one you want associated to this dashboard.
- The View ID needs to come from your normal Google Analytics account (not Google Developers Console).
- Open the Admin tab to locate your Accounts with associated Properties and Views.
- Click View Settings to get the View ID.
- Copy the View ID and enter it in the TERMINALFOUR Site Manager dashboard; then click Save changes. Your dashboard is complete, and you can start adding reports to it.
Dashboards serve no purpose unless you attach one or more reports to them. Reports are referred to as widgets in TERMINALFOUR.
- To create a new widget, select Add Widget from the Actions drop-down menu.
- Fill in the relevant information.
- Click Save changes.
Each widget can be based on some or all of the following options:
- Widget size: select either small, medium or large. This will determine the size of the widget on the user's dashboard.
- Dimensions: used to describe data. A dimension for a geographic location could have dimensions called Latitude, Longitude, or City Name. Values for the City Name dimension could be Boston, Dublin, or Sydney. Check the Dimensions & Metrics Reference for valid dimensions.
- Metrics: individual elements of a dimension that can be measured as a sum or a ratio. For example, the dimension City can be associated with a metric like Population, which would have a sum value of all the residents of the specific city. Screenviews, Page per Session, and Average Session Duration are examples of metrics in Google Analytics. Check the Dimensions & Metrics Reference for valid metrics.
- Segment: used so you can focus on specific elements of your traffic. As an example, you can focus on users from a particular country, from a particular campaign, who visit during a particular hour of the day, etc. Check the Dimensions & Metrics Reference for valid segments.
- Filters: used to filter the results. For information on how to create filters, check the Google documentation.
- Sort: you can sort results according to either metrics or dimensions.
- Date range: select the fixed date range if you want to set a start date and end date. Alternatively, select the variable date range and set the interval.
- Interval: specify the number of days, weeks or months you want to use for the interval.
- Start index: if your result set contains e.g. 50 values, you can opt to start the index at e.g. 20 to ignore the first 20 values.
- Max results: specify the maximum results to output.
In the following section you can see sample widgets.
This query returns information about sessions which occurred from mobile devices. Note that "Mobile Traffic" is defined using the default segment ID -14.