Knowledge Base

Google Analytics dashboards

Last Modified:
14 Dec 2018
User Level:
Administrator

Description

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:

Screenshot of the Analytics option from the side menu

 

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):

Screenshot of the Create New Project in the Google API console

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):

Select Enable:

To get started with the API you’ll have to Create Credentials to use with it:

Screenshot of the Create Credentials button

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 Description
Name The name of the Client ID
Authorized Javascript Origins

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:

Screenshot of the Add Credentials to Project screen in the Google API console

Select Done.

Once you've created the credentials are created, you can select its name from the list that appears:

Screenshot of a list of credentials in the Google API console

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:

Screenshot of the Client ID and Secret being pasted into Analytics Account settings 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:

Screenshot showing the Authorize account option being selected

Then, select Allow from the pop-up that will appear. The requesting domain will differ from the one here:

Screenshot of the Google Account authorization screen

When authorized, the status will be updated:

Screenshot of Analytics Account listing screen with account status changed to Approved

 

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:

Screenshot of the edit dashboard screen

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:

Screenshot of the Select Account modal

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:

Screenshot of Google Analytics interface with Admin link highlighted

Make sure that you have the right Property (website to track) selected and select View Settings: 

Screenshot of the Admin screen in Google Analytics with the View Settings option highlighted

Copy the View ID:

Screenshot of the Google Analytics View ID highlighted

Paste it into the View ID box in the Analytics settings:

Screenshot of the View ID populated in the Dashboard settings screen

Enable the Dashboard and choose Save Changes:

Screenshot of the Enable Dashboards option in Dashboard settings

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:

Animated GIF of Dashboards in TERMINALFOUR

Customize Dashboard

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:

Screenshot of Dashboard Reports listing

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.

ItemDescription
Widget Size

Determines the size of the widget on the user's Dashboard.

  • Small (33.33% of available screen width)
  • Medium (50% of available screen width)
  • Large (100% of available screen width)
Dimensions

Used to describe data. A dimension for a geographic location could have dimensions called LatitudeLongitude, or City Name. Values for the City Name dimension could be BostonDublin, or Sydney.

To learn more about Dimension and Metrics have a look at Analytics Help.

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. ScreenviewsPage per Session and Average Session Duration are examples of metrics in Google Analytics.

To learn more about Dimension and Metrics have a look at Analytics Help.

Check the Dimensions & Metrics Reference for valid Metrics.

Segment

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.

More information on segments.

Explore the available segments.

Filters

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.
Ascending: ga:visits Descending: -ga:visits
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. 
Chart data

Display returned data as a pie chart or line chart.

  • Line chart

    • X-axis label: the label used for the x-axis (along the bottom), this can be hidden if not needed.
    • Y-axis label: the label used for the y-axis (along the left-hand side), this can be hidden if not needed.
    • Legend: displays a color with a label; this can be hidden if not needed.
    • Guide Line: when the cursor hovers over a line, description of the data is displayed, this can be hidden if not needed.
    • Lines: allows you to map the data to individual lines on the chart.
  • Pie chart

    • Label: where to get the labels for each slice on the pie chart.
    • Value: where to get the value for each slice on the pie chart.
    • Legend: displays a color with a label; this can be hidden if not needed.
    • Labels: show the labels beside the slices or hide them.
    • Doughnut: display the pie chart as a doughnut (hole in the middle).
    • Label type: display percent, value or the key name.
    • Label threshold: if a value is small what percentage does it need before it is hidden.
    • Width: the width of the chart.
    • Height: the height of the chat.  

Sample Report

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:

Screenshot of a sample report

Direct Edit Integration

Once a Dashboard is displaying correctly it can be associated with a Channel.

Screenshot of Channel associated with a Dashboard

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:

Screenshot of Analytics in Direct Edit

Site analytics

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.

Topic list

In this section you can read about the following topics:

Accounts

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)

  1. Ensure you already have a Google Analytics account, as you'll need to use that.
  2. Open the Google Developers Console and log in.
  3. Ensure the Analytics API is turned on.

 

Analytics API turned on

You are now ready to create a new project. Make a note of the name, as you'll need it later.

  1. Go to the project's Credentials and click Create new Client ID.
  2. Set the Application Type as Web application.
  3. You can leave the Authorized JavaScript Origins blank.

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.

Create Client ID

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.

Client ID details

Add account (TERMINALFOUR)

  1. To add an account go to: System Administration -> System settings -> Analytics -> Analytics accounts -> Create new account

  1. Fill in the Name and Description for the new account.
  2. Copy the Client ID and Client secret from the account you have created in Google Analytics.
  3. In the Product name you need to enter the project's name from the account you have created in Google Analytics.
  4. Redirect URL is created by TERMINALFOUR and needs to be entered in the settings for the Client ID in Google Analytics.
  5. Click Save changes.

V8, VO,

Authorise account

  1. Now you can authorise your account in TERMINALFOUR. To do that, click Grant access.
  2. A Google screen will open, asking you to accept that you're granting access.
  3. Make sure to click Save changes once the account has authorised.

Edit account

Dashboards

An Analytics dashboard in TERMINALFOUR is a graphical representation of a view from Google Analytics.

  1. To create a new dashboard, go to the Configure dashboards screen and click Create dashboard.
  2. Enter a Name and Description for your dashboard.
  3. Click Select account to bring up a list of the Google accounts you have configured. Select the one you want associated to this dashboard.

Create new dashboard

  1. The View ID needs to come from your normal Google Analytics account (not Google Developers Console).
  2. Open the Admin tab to locate your Accounts with associated Properties and Views.
  3. Click View Settings to get the View ID.
  4. 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.

View ID

Reports

Dashboards serve no purpose unless you attach one or more reports to them. Reports are referred to as widgets in TERMINALFOUR.

  1. To create a new widget, select Add Widget from the Actions drop-down menu.
  2. Fill in the relevant information.
  3. Click Save changes.

Create a widget

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.

Sample reports

In the following section you can see sample widgets.

Mobile Traffic

This query returns information about sessions which occurred from mobile devices. Note that "Mobile Traffic" is defined using the default segment ID -14.

Screenshot of Report settings for Mobile traffic