A NSW Government website

Our website uses an automatic service to translate our content into different languages. These translations should be used as a guide only.

demo dds
Department of Demonstrations

Analytics

The site can tell you how people use it: which pages they read, how they get from one page to the next, how far down a page they get, what they download, and which languages they translate the site into. It does this with Google Analytics 4, and only for visitors who say yes to it.

Nothing on this page is collected until a visitor accepts analytics cookies in the cookie banner. If they choose “Only necessary cookies”, or later change their mind in Cookie settings, the site stops measuring at that moment — no reload needed. Your site also has to have analytics switched on: ask whoever hosts it.

What the site measures

Some of this Google Analytics records on its own; the rest the site adds. Each kind of activity arrives in Google Analytics as an event with a name, listed here so you know what to look for.

What is measured, and the event it arrives as
ActivityWhat you learnEvent name

Visiting a page

Which pages are read, how often, and from where visitors arrived.

page_view

Time on the page

How long a page held a visitor’s attention (engagement time).

user_engagement

Mobile or desktop

The kind of device, browser and screen size used.

Recorded with every event

Following a link

Which link a visitor followed and where it sat: the hero banner, a card (and which one), the main menu, the footer, a button, or a link in the text.

navigation

Email, phone and other sites

Clicks on email addresses, phone numbers and links to other websites, even where nobody set anything up for them.

navigation

Downloading a file

Which documents are downloaded, from which page.

file_download

Scrolling

Whether visitors reach a quarter, half or three quarters of the way down (and, from Google Analytics itself, 90%).

scroll

Opening and choosing

Accordion items opened or closed, tabs chosen, and filter lists shown in full.

select_content

Translating the site

How many visitors use Google Translate, and which languages they choose.

translate

Printing

Pages printed or saved as a PDF.

print_page

Copying text

The start of any text a visitor copies from a page, and how long it was.

copy

What comes with each event

An event carries a few details, always under the same names, so one report can compare a card with a hero banner, or this month with last.

Details sent with events
DetailWhat it holdsExample

type

What the visitor used.

card, hero banner, main nav, footer, accordion, percent

text

The words on the link or control, or the language chosen for a translation.

Contact us

url

Where a link goes.

/contact

section

The heading it sits under: a hero’s heading, a footer column, a main menu item.

Popular

index_link

Its position among its neighbours, counting from 1 in reading order.

2

index_total

How many links there are in that set.

6

index_section

Which item it belongs to among several: a menu item, an accordion item, a tab.

3

action

What happened to something that opens and closes.

opened, closed

external

Whether the link leaves the site.

true, false

link_domain

The website a link goes to.

www.nsw.gov.au

method

How it was clicked: normally, into a new tab, or with the right mouse button.

primary click, ctrl click

percent_scrolled

How far down the page, for a scroll event.

50

Every event also says what kind of page it happened on:

Details about the page
DetailWhat it holdsExample

content_type

The kind of content.

Document, News Item

site_section

The top-level section of the site the page is in.

Publications

published_date

When the page was published.

2026-02-09

updated_date

When it last changed.

2026-03-01

content_language

The language the page is written in.

en

status_code

Whether the page was found: 200 for a normal page, 404 for one that does not exist.

404

What is never sent

  • Anything at all from a visitor who has not accepted analytics cookies.
  • Email addresses and phone numbers, wherever they appear — in link text, in an address, in copied text. They arrive as [email] and [phone number]. The site’s own published email addresses and phone numbers are the one exception, so you can see which one people chose.
  • What visitors type into forms, or copy out of them.
  • More than the first 30 characters of anything copied.
  • Activity while you are editing a page in the editor.

Finding it in Google Analytics

Most questions are answered in Reports for the everyday figures and Explore for anything about the details above. New activity shows in Reports → Realtime within seconds; the other reports take up to two days to catch up.

Which pages are read, and for how long

Reports → Engagement → Pages and screens. Views counts visits to each page; Average engagement time is how long it held visitors. Add Status code as a secondary dimension to find visits to pages that do not exist.

Mobile or desktop

Reports → Tech → Tech details, then choose Device category. It can be added as a secondary dimension to most other reports too.

How people get to a page

For example: do people reach the Contact page from the hero banner, or from a card on the home page? In Explore, start a blank Free form exploration and:

  • Add the dimensions Event name, Page path and screen class, type, index_link and url, and the metric Event count.
  • Filter Event name exactly matches navigation, and url contains the page’s address, such as /contact.
  • Put Page path and screen class (the page they were on), then type and index_link in Rows, and Event count in Values.

Each row is one route: “from the home page, the second card, 340 times”.

Downloads, emails and phone calls

Filter Event name to file_download and show text and Page path and screen class, for which documents are downloaded and from where. For email and phone links, filter to navigation and type to email or phone.

How far people read

Filter Event name to scroll, with Page path and screen class and Percent scrolled in Rows. The 25, 50 and 75 rows come from the site; 90 comes from Google Analytics. Compare each with the page’s views to see where readers stop.

Google Translate

Filter Event name to translate and put text in Rows: each row is a language, by its short code (vi is Vietnamese, zh-CN Simplified Chinese, ar Arabic).

Accordions, tabs, printing and copying

The same way, with select_content (show type, text and action), print_page or copy. Copying is a good sign of what people take away: phone numbers, reference numbers and addresses.

The details in “What comes with each event” only appear in Google Analytics once they are registered as custom dimensions, and not for activity from before that — see Setting up your Google Analytics property below. If one is missing from the list in Explore, that is the step to check.

Setting up your Google Analytics property

These steps are for whoever administers the site’s Google Analytics property. Do them once, before the site goes live, and again if the site moves to a different property. Until they are done, the details above are collected but can’t be used in reports.

Register the custom dimensions

In Google Analytics, go to Admin → Data display → Custom definitions, open the Custom dimensions tab and choose Create custom dimension. Create one for each row below, using the name in the first column as both the Dimension name and the Event parameter, with Scope set to Event. If the event parameter isn’t offered in the list yet, type it in.

Custom dimensions to create (scope: Event)
Dimension name and event parameterWhat it holds

type

What the visitor used: card, hero banner, main nav, footer, accordion…

text

The words on the link or control, or the language chosen for a translation.

url

Where a link goes.

section

The heading it sits under.

action

What happened to something that opens and closes.

external

Whether the link leaves the site.

method

How the link was clicked.

link_domain

The website a link goes to.

index_link

The link’s position among its neighbours.

index_total

How many links are in that set.

index_section

Which item it belongs to: a menu item, an accordion item, a tab.

index_section_count

How many of those items there are.

length

How long a piece of copied text was.

content_type

The kind of content the page is.

site_section

The top-level section of the site the page is in.

published_date

When the page was published.

updated_date

When the page last changed.

content_language

The language the page is written in.

status_code

Whether the page was found (200) or not (404).

Google Analytics only fills a custom dimension from the day it is created, never for activity before it, which is why this is done before launch. Percent scrolled is built into Google Analytics and needs nothing.

Enhanced measurement

Go to Admin → Data collection and modification → Data streams, choose the site’s web stream, and open Enhanced measurement (the gear icon).

  • Keep these on: Page views (and, under its advanced settings, Page changes based on browser history events), Scrolls, Site search and Form interactions.
  • Turn these off: Outbound clicks and File downloads. The site reports both itself, with more detail — which part of the page the link was in, and its position — and leaving Google’s on counts each one twice under different names.

Site search

In the same panel, open Site search → Show advanced settings and add SearchableText to the search term query parameters. It is the name this site’s search uses in its address; without it, Google Analytics doesn’t recognise a search, and the search terms report stays empty.

Redact data

On the same web stream, open Redact data and turn on Email. Google Analytics then removes email addresses from what it collects itself, such as page addresses, before they are stored. Don’t add SearchableText to the query parameters to redact: that would remove the search terms the site search report needs. The site already removes email addresses and phone numbers from its own events.

Your part as an editor

None. Every block records its own links and controls, so a hero banner or card you add is measured as soon as it is published. Links in text, links to other sites and files are measured wherever they are. The one thing to keep in mind is that the words on a link are what you will see in the reports, so “Make a complaint” tells you more than “Click here” — which is good advice for writing links anyway.