Google Analytics and Filters

This guide will help you build an effective Google Analytics dashboard so you can monitor what’s going on in your business.

What’s inside:

  • Quick start: Set up your Google Analytics dashboard in 3 steps
  • Using filters: How to filter your data to display exactly what you want
  • Widgets: Available widgets and the metrics for each



Introduction

Google Analytics is a free analytics platform built by Google that enables a wide range of metrics and user behaviours to be tracked and monitored on your website. Once installed on your site, your visitors can be tracked as they navigate the pages of your website, building up a picture of where they are arriving from, their browsing patterns, and eventually how they arrive at a specified goal.

For any website owner or marketer, Google Analytics will be able to answer most questions related to the performance of your website. Geckoboard’s integration makes it possible to monitor this data in real time on your own Google Analytics dashboard.

Use Cases

Google Analytics can be used to track a huge range of behaviours on a website, and Geckoboard’s integration can be configured in an equally huge range of ways. Some of the more popular use cases for pulling Google Analytics data into Geckoboard include:

  • Measuring the general health of your marketing efforts by tracking the number of visitors coming to your website over time
  • Monitoring which traffic sources are referring the most traffic to your site today
  • Tracking revenue generated by your website and seeing whether this has increased or decreased compared to the previous time period
  • Visualising metrics such as number of content shares, number of products added to a shopping basket or clicks on a specific button on your website

Each business and website is different, and the metrics you choose to monitor should reflect your most pressing goals.

For more information on how to choose metrics that matter, check out our interview with Brad Feld, Managing Director at Foundry Group.

Quick Start

Gathering visitor data and viewing it on Geckoboard is straightforward. Note: You will need a live website and the ability to make edits to its template code in order to start tracking data.

Sign up for Google Analytics, first step

Sign up for a Google Analytics account or sign in to an existing Google account if you have one. If you have a Google Apps for Business account and you are tracking your business’s website data, you will want to use this.

Sign up for Google Analytics, second step

Grab your unique tracker code and add it to your website. Verify data is being pushed through to Google Analytics by visiting your website and loading up your Google Analytics dashboard. You should begin to see data being logged within a few seconds. Read more about how to set up your tracking code here.

Sign up for Google Analytics, third step

Log in to Geckoboard and authorise your Google Analytics account by clicking ‘Add Widget’ and selecting Google Analytics from the list of integrations. You’ll be prompted to log in to your Google Analytics account and grant Geckoboard access to your data via a popup window.

Once you have your tracking code set up and your Google Analytics account connected to Geckoboard, you’ll be able to build widgets and manipulate your data for monitoring going forward.

In all Google Analytics widgets you’ll be prompted to configure a combination of the following:

  1. Title - Describe what it is your widget is displaying.
  2. Size - Select the size of your widget.
  3. Account - Select or connect a Google Analytics account to pull data from. NB You can connect multiple Google Analytics accounts to Geckoboard.
  4. Website - Select the website you wish to display data for. See here for more information on setting up multiple websites and profiles.
  5. Profile - Select the website profile you wish to display data for. See here for more information on setting up multiple websites and profiles.
  6. Metric - Each widget has a range of metrics it can display. Select the metric you wish to track here.
  7. Segment - View data for a particular visitor segment, e.g Returning users.
  8. Filter By Device - Restrict your data to visitors from a specific category of device.
  9. Filters - Apply a filter to further define the data you want to view. See the ‘Filters’ section later in this guide for more information and examples.
  10. Period - Define the time period you wish to view data for.
  11. Secondary Output - Add a secondary visualisation to your widget to give added context to your metric, for example how the metric has changed over the time period relative to the previous time period.
  12. Secondary Output Period - Define the time period your (optional) secondary output reports on.

Standard Widgets Vs Real Time

Geckoboard connects to both standard and real-time Google Analytics data. Widgets that contain the word ‘Current’ in their descriptions (e.g Current Sources List)will show the most recent data available to Geckoboard, and update approximately every three and a half minutes. Standard widgets will refresh every 15-30 minutes and display data for the period you have defined when setting them up.

Filters

A useful feature built into most of Geckoboard’s Google Analytics widgets is the ability to filter the data your widget displays using Google’s own powerful Filter API. Filters are short statements that you can apply within a Google Analytics widget that give you added flexibility to let you refine the data that’s displayed in your widget so you can display exactly the metric you want.

For example, let’s say you are interested in building a Current Visitors Count widget that displays the number of visitors currently on the contact page on your website. By default the widget will pull through the total number of visitors across the whole of the website you’re tracking with Google Analytics. However, applying the filter ga:pageTitle==Contact would allow you to refine this and display only the visitors currently on your page titled ‘Contact’ on your widget.

Where available, filters can be applied from within your widget’s setup screen by adding a filter statement to the ‘Filters’ field when editing a widget.

anatomy-of-a-filter

Building a filter statement: Dimensions & Metrics

A filter statement consists of several elements that tell the widget exactly what data needs to be displayed. The cornerstone of this statement is the dimension or metric that the widget is supposed to filter, such as the source of traffic or the URL of a specific page.

A full range of metrics and dimensions can be found at https://developers.google.com/ analytics/devguides/reporting/core/dimsmets. Almost all of these can be added and even combined within a filter statement to create a very specific set of data within a widget.

Popular dimensions and metrics include:

campaign year keyword city
pageTitle language transactions userAgeBracket
date medium day goalPreviousStep1
browser timeOnPage country
source month productBrand
pagePath screenResolution bounceRate

Building a filter statement: Operators

Operators work with metrics to allow you to specify how your data should be manipulated. For example, if you’ve selected ‘city’ as the metric you’re interested in, do you want to include only data from a specific city, exclude data from a specific city, include only data from a specific list of cities, or display data from cities that contain a specific word? Operators let you take the basic ‘city’ data and do much more with it than simply showing it.

OPERATOR DESCRIPTION EXAMPLE
== Equals, exact match Show data for visitors who have visited your website exactly 8 times. ga:sessionCount==8
!= Does not equal, does not match Show visitor data for all sources apart from Geckoboard. ga:source!=geckoboard
> Greater than Show data for visitors who have visited your website over 9 times. ga:sessionCount>9
< Less than Show data for visitors who have visited your website fewer than 2 times. ga:sessionCount<2
>= Greater than or equal to Show data for visitors who have visited your website 9 times or more. ga:sessionCount>=9
=@ Contains Show data for any page whose URL contains the word ‘learn’. ga:pagePath=@learn
!@ Does not contain ga:pagePath!@404
=~ Contains a match for a regular expression Show data for visitors from countries starting with ‘united’. ga:country=~united
!~ Does not contain a match for a regular expression Exclude data for visitors from countries starting with ‘united’. ga:country!~united

Source: https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filterOperators

Building a filter statement: Strings & Values

The final part of a filter statement to be aware of is the string or value. Set at the end, it lets you define a specific value for the metric you’re basing your filter on, for example an individual city, date, page title or traffic source. The string or value should match those available for the metric you’ve defined in the first part of the statement, i.e if your metric is ‘city’ you much choose the name of a city to filter or else you will trigger an error.

Combining filters

Filters can also be combined using AND as well as OR logic to create a powerful tool for monitoring very specific elements of your website.

The OR operator is defined using a comma (,). It takes precedence over the AND operator and may NOT be used to combine dimensions and metrics in the same expression.

Example: Visitors using either Windows OR Macintosh operating systems: ga:operatingSystem== Windows,ga:operatingSystem==Macintosh

The AND operator is defined using a semi-colon (;). It is preceded by the OR operator and CAN be used to combine dimensions and metrics in the same expression.

Example: Country is United Kingdom AND the source is Facebook: ga:country==United%20 Kingdom;ga:browser==Facebook

Source: https://developers.google.com/analytics/devguides/reporting/core/v3/reference#combiningFilters

Example Filters

Here are some example filters to get you started:


FILTER SYNTAX
ga:source==twitter.com Traffic source is Twitter
ga:keyword==geckoboard Referring keyword is ‘geckoboard’
ga:pageTitle==Contact Title of page is ‘Contact’ (exact match)
ga:pagePath=~contact URL of page contains ‘contact’ anywhere
ga:country==United Kingdom Visitor country is United Kingdom
ga:country==United Kingdom;ga:city!=London Country is United Kingdom and City is not London
ga:eventCategory==DownloadReport,ga:eventCategory==DownloadCaseStudy Show all events with the category DownloadReport or DownloadCaseStudy
ga:eventCategory==DownloadReport,ga:eventLabel!=ShareCaseStudy Show all events with the category Download but not Label ShareCaseStudy

The Widgets

Selecting the correct widgets to communicate your metrics clearly is a crucial step towards making your dashboard useful. The following list of Geckoboard’s Google Analytics widgets should help you decide which visualisations fit the metrics you wish to monitor.


Number metric with sparkline VISITORS NUMBER STATS
A simple, glanceable way to display the value of a metric for a specific time period, along with a smaller indicator of how this has changed over time. Visits, Pageviews, Pages/visit, Bounce rate, % New visits, Unique visitors.
Line chart metric VISITORS LINE CHART
Track the value of a metric over a specific time period, with the option to compare this with the previous time period and/or highlight values above a threshold. Visits, Pageviews, Pages/visit, Bounce rate, % New visits, Unique visitors.
Event metrics EVENTS NUMBER STATS
A simple, glanceable way to display the value of a GA event metric for a specific time period, along with a smaller indicator of how this has changed over time. Total Events, Unique Events, Event Value, Avg. Event Value, Visits with Event, Events per visit with Event.
Event metrics as line chart EVENTS LINE CHART
Track the value of an Event metric over a specific time period, with the option to compare this with the previous time period and/or highlight values above a threshold. Total Events, Unique Events, Event Value, Avg. Event Value, Visits with Event, Events per visit with Event.
Goal metrics GOALS NUMBER STATS
A simple, glanceable way to display the value of a GA Goal metric for a specific time period, along with a smaller indicator of how this has changed over time. Goal starts, Goal completions, Goal completion rate, Goal conversion rate, Goal value.
Goal metrics as line chart GOALS LINE CHART
Track the value of a Goal metric over a specific time period, with the option to compare this with the previous time period and/or highlight values above a threshold. Goal starts, Goal completions, Goal completion rate, Goal conversion rate, Goal value.
Campaign metrics CAMPAIGN NUMBER STATS
A simple, glanceable way to display the value of a GA Campaign metric for a specific time period, along with a smaller indicator of how this has changed over time. Ad clicks, Ad cost, CPC, CPM, CTR, Impressions.
Campaign metrics as line chart CAMPAIGN LINE CHART
Track the value of a Campaign metric over a specific time period, with the option to compare this with the previous time period and/or highlight values above a threshold. Ad clicks, Ad cost, CPC, CPM, CTR, Impressions.
Ecommerce metrics ECOMMERCE NUMBER STATS
A simple, glanceable way to display the value of a GA Ecommerce metric for a specific time period, along with a smaller indicator of how this has changed over time. Total Item Revenue, Total Transaction Revenue, Number of Items Purchased, Number of Transactions.
Ecommerce metrics as line chart ECOMMERCE LINE CHART
Track the value of an Ecommerce metric over a specific time period, with the option to compare this with the previous time period and/or highlight values above a threshold. Total Item Revenue, Total Transaction Revenue, Number of Items Purchased, Number of Transactions.
Top locations TOP LOCATION LIST
A list of top visitor locations that drive a particular metric over a given time period. Display by: Language, Continent, Sub-Continent, Country, Region, Designated Market Area, City.
Top pages TOP PAGES LIST
A list of top content pages that drive a a particular metric over a given time period. Entrances, Entrance rate, Pageviews, Unique pageviews, Pageviews per visit, Page value, Time on page, Average time on page, Exits, Exit rate.
Top platforms TOP PLATFORM LIST
A list of top visitor platforms that drive a particular metric over a given time period. Drill down by: Browser, Browser version, Operating system, Operating system version, Mobile manufacturer, Mobile model, Mobile selector, Mobile device info, Flash version, Screen colours, Screen resolution.
Top sources TOP SOURCES LIST
A list of top traffic sources that drive a particular metric over a given time period. Drill down by: Referral path, Campaign, Source, Medium, Keyword, Advert, Social Network.
Current locations CURRENT LOCATION LIST
A real-time list of current visitor locations. Display by: Country, Region, City.
Current pages CURRENT PAGE LIST
A real-time list of current pages being browsed by visitors. Display by: Page path, Page title.
Current platforms CURRENT PLATFORM LIST
A real-time list of current platforms being used by visitors. Display by: Browser, Browser version, Operating system, Operating system version, Device category, Mobile device brand, Mobile device model.
Current sources CURRENT SOURCES LIST
A real-time list of where visitors currently on your site have arrived from. Display by: Referral path, Campaign, Source, Medium, Keyword, Traffic type.
Current visitor count CURRENT VISITOR COUNT
A simple, glanceable way to display the current number of visitors on your website.
Current visitor gauge CURRENT VISITOR GAUGE
A simple, glanceable way to display the number of visitors currently on your website, relative to the maximum and minimum traffic your site has received whilst the widget has been on your dashboard.
Current visitor map CURRENT VISITOR MAP
A simple, glanceable way to display the rough location of visitors currently browsing your website. Display data by: World, Continent, Country.

Example dashboards

Here are a few examples of Google Analytics dashboards to get you inspired

Monitor website visitor trends website-visitor-trends

Display real-time visitor metrics display-real-time-visitor-metrics

Further reading

further-reading

Ready to take your learning further? There’s a number of useful resources out there to help explain the hundreds of other ways to get the most out of Google Analytics. As always, send an email to support@geckoboard.com if you have any questions.