Skip to main content

A Google Analytics (GA) event might sound like a soiree held at one of their shiny offices. Unfortunately (or fortunately?) events are needed to track user interactions that aren’t covered by the core reports.

Why do I need to use events?

Events are user interactions with content that can be tracked independently from a web page or a screen load. See Google Analytics guidance for more information.

You need to add events to your page code to tell GA to track some of your most valuable user interactions. You’ll need a developer to add these into the page code. Here are some examples of content elements that you can track using events.

Top things to track with events:

  1. submit buttons
  2. global navigation links
  3. external links
  5. social follows and social shares.

1. Submit buttons

Submit buttons are links that people click when submitting forms, completing transactions, and email links. Anything where a user is sending information to you, or taking an action that will cause data to change in a back-end database. If you have a ‘Done’ or ‘Thank you’ page that tells the user you’ve received their data then you won’t need to add an event since they'll appear as a separate URL in the 'All pages' report in Google Analytics.

For example had a form where users could submit feedback for the Open Government Partnership Action Plan.

Image showing a Submit button on a online form.

2. Global navigation links

If you have navigation links that appear on every page you can track the usage of them across your site. Same goes for breadcrumbs, related links, deep footer links etc. For example have a home page link that appears on every page:

Home page link that appears on all

3. External links

GA only tracks links that lead to other pages on your site, it doesn’t track links that lead to other sites.

For example on we need to track links to other government agency sites:

Screenshot showing an external link to Inland Revenue from


The core GA reports don’t track downloads because clicking on them doesn’t load a new page. So you'll need to add events to PDFs and other documents.

5. Social follows and social shares

Link these buttons to events so that you can track social follow buttons across different pages:

Image of social buttons that appear on the Te Papa site.

Structuring the data for Google Analytics

GA allows three levels of data to be tracked called Category, Action and Label. You can specify what you'd like to see in each level. When you start out it's best to keep it simple, for example when tracking downloads I use this structure:

  • Event category: the thing you're tracking e.g. Download
  • Event action: PDF name
  • Event label: origin URL

This will allow you to see the title of the document that's been downloaded, and the page it's been downloaded from.

Events can be used differently for different page elements, and can be tricky to get your head around. So it's great if you can have a look at an account which already has them set up and see how they work.

Utility links and page information