ARCHIVE: Using GTM to track preezie in your Google Analytics

Note: We have replaced this tracking method with a data layer method, please use this guide instead.

Why we track

In order to analyse how preezie engaged users behave amongst any of your other website metrics, we recommend adding 2 custom events into your Google Analytics. This allows you to:

  • Analyse behaviour of preezie user vs non-preezie users, e.g. what % of new users are bouncing?

  • Trigger other events using the preezie events as a trigger, e.g. trigger an end of preezie journey survey

  • Pass the event data back to your other systems, e.g. pass a custom preezie user flag variable to your CDP

This tracking works in parallel with your preezie Performance Dashboard in order to deep dive within your own analytics whenever required.

How to set up via a Tag Manager

It is simple to set up using any tag manager software that can listen for to user click events on HTML classes, e.g. Google Tag Manager, Tealium.

This guide covers using Google Tag Manager to add 2 tags:

GTM: Adding to Google Analytics (Universal Analytics)

You’ll need to create 2 tags with a custom trigger for each.

1a. Tag: preezie journey click

This will track any click on the answers or navigation buttons, the event label can be used in GA to filter/segment on what the user has clicked on, for example GET RESULT!

Note, clicks to the answers and auto-advance questions will have no event label.

Field

Value

Field

Value

Tag name

preezie journey clicks

Tag Type

Google Analytics: Universal Analytics

Track Type

Event

Category

preezie

Action

Journey click

Label*

{{Click Text}}

Value

<leave blank>

Google Analytics Settings

{{GA Tracking ID}}

*If you can’t see the variable Click Text, then you will need to add it via Variables > Configure > Configure Built-In Variables and check the Click Text box:

Your new tag set up will look like this:

1b. Trigger: preezie journey click

This will fire the above tag whenever the specific HTML classes are seen in GTM’s Data Layer.

Field

Value

Field

Value

Trigger Name

preezie journey clicks

Trigger Type

Click - All Elements

This trigger fires on

Some Clicks

Click Classes

matches RegEx

workflow_| selector_|exitintent_|popup_|cta_

(optional) Page path

<all pages that preezie fires on>

This will look like this:

You now have your tag and trigger ready to go, use the Preview mode to check that the tag is firing whenever you click the NEXT, BACK and GET RESULTS buttons:

Once Published, this event in GA will be shown under Action: Journey click with labels matching the text on your preezie buttons. Because of this we highly recommend having your final question be a GET RESULT button click and NOT an auto-advance question type, this is also best practice to tell your users the questions are done.

Note, (not set) represents ANY user clicks to choose an answer or if the question has auto-advance switched on:

2a. Tag: preezie results click

This will track which product results the user is clicking on including each product URL. It fires each time they click.

Field

Value

Field

Value

Tag name

preezie result clicks

Tag Type

Google Analytics: Universal Analytics

Track Type

Event

Category

preezie

Action

Result click

Label*

{{Click URL}}

Value

<leave blank>

Google Analytics Settings

{{GA Tracking ID}}

*Again, if you can’t see the variable Click URL, then you will need to add it via Variables > Configure > Configure Built-In Variables.

2b. Trigger: preezie results click

This will fire the above tag whenever the specific HTML link classes are seen in GTM’s Data Layer.

Field

Value

Field

Value

Trigger Name

preezie result clicks

Trigger Type

Click - Just Links

This trigger fires on

Some Link Clicks

Click Element

matches CSS selector
#preezieres > div > div > div > a

(optional) Page path

<all pages that preezie fires on>

This will look like this:

Once published, this event in GA will be shown under Action: Result click with labels showing each URL of the product from your website.

This can then be easily analysed to see which products are popular and how engagement and conversion behaviour occurs over time.

Creating GA segments using preezie

Now you have your clicks tracked, you can create custom Segments to compare user behaviour over time. For example, show me all New users who clicked on a preezie question at least once:

Compared to the opposite, New users who do not have any preezie events:

These segments will then let you run any GA report comparing these 2 user buckets:


GTM: Adding to Google Analytics (GA4)

GA4 tags can run in parallel with Universal Analytics tags and only requires a change to the tag values.

3a. Tag: preezie journey click

This will track any click on the answers or navigation buttons, the event label can be used in GA to filter/segment on what the user has clicked on, for example GET RESULT!

Note, clicks to the answers and auto-advance questions will have no event label.

Field

Value

Field

Value

Tag name

preezie journey clicks

Tag Type

GA4 Tag

Event Name

journey click

Parameter Name

journey_click

Value

{{Click Text}}

This should look like the below, hit Save:

3b. Trigger: preezie journey click

As per the UA version, this will fire the above tag whenever the specific HTML classes are seen in GTM’s Data Layer. Note, these are the exact same trigger values for the UA version so you can just reference that same trigger if you have already created it.

Field

Value

Field

Value

Trigger Name

preezie journey clicks

Trigger Type

Click - All Elements

This trigger fires on

Some Clicks

Click Classes

matches RegEx

workflow_| selector_|exitintent_|popup_|cta_

(optional) Page path

<all pages that preezie fires on>

This will look like this:

4a. Tag: preezie results click

This will track which product results the user is clicking on including each product URL. It fires each time they click.

Field

Value

Field

Value

Tag name

preezie result clicks

Tag Type

GA4 Tag

Event Name

journey result click

Parameter Name

journey_result

Label*

{{Click URL}}

4b. Trigger: preezie results click

This will fire the above tag whenever the specific HTML link classes are seen in GTM’s Data Layer. It is identical to the UA version, so reuse that trigger if you have already created it.

Field

Value

Field

Value

Trigger Name

preezie result clicks

Trigger Type

Click - Just Links

This trigger fires on

Some Link Clicks

Click Classes

matches CSS selector

#preezieres > div > div > div > a

(optional) Page path

<all pages that preezie fires on>

This will look like this:

GA: Setting up your events in GA4

We now need to create some custom dimensions in GA4 to recognise your new events.
Note, after publishing in GTM it takes around 24 hours to show custom events in your GA.

Adding the journey clicks

In your GA4 go to Admin > Custom definitions > Create custom dimensions

In the Create custom metrics menu add the below values:

Field

Value

Field

Value

Dimension name

preezie journey click

Scope

Event

Description

any click to the preezie journey

Event parameter

journey_click

The Event parameter value must match your GTM’s Parameter Name value given in step 3a above. This will look like this:

Adding the result clicks

Do the same process as above by clicking Create custom dimensions:

In the Create custom dimensions menu add the below values:

Field

Value

Field

Value

Dimension name

preezie result click

Scope

Event

Description

any product click from preezie journey

Event parameter

journey_result

The Event parameter value must match your GTM’s Parameter Name value given in step 4a above.

You can now publish all of your GTM changes to start tracking events.

Using your events in GA4

To check your events are being recorded go to Admin > Events. Note, you will see a value of (not set) for a custom dimension in the first 48 hours after you’ve created them.

Click through your preezie journeys and change the date range to today, you should see event activity:

Explore > Explorations > Dimensions

A useful report to start viewing event data across your other metrics is the Explorations view. Visit Explore > Explorations > choose a report type, e.g. Freeform

From here you can add your 2 new custom Dimensions that represent preezie events. First click the + sign in Dimensions:

and choose Custom then find your new events and click Import. This will add them to the Dimensions choices to be used as columns or rows in your Freeform report.

Give your report a name, e.g. preezie engaged user and add preezie journey click to the rows and Total users, New users and Returning users to Values. This will tell us who is engaging with preezie, which is 96% in thge below example:

The most powerful method of using these events here is by creating segments. To do, that click the SEGMENTS + sign and choose User segment.

Give the segment a name (e.g. preezie engaged user), Add new condition then search for ‘journey click’ in items, or choose it via Events > journey click. Then choose

ADD PARAMETER > Custom > preezie journey click > Condition: CONTAINS > NEXT

This creates a segment where the preezie journey click event has occurred with a value containing ‘NEXT’ (change this value depending on the text used in your NEXT buttons). This value comes from the {{Click Text}} of your GTM tag, and makes the segment represent when a shopper clicks NEXT for each question:

You can then create the opposite using the same condition criteria but under 'Permanently exclude Users' segment option for a non-preezie engaged user:

You can now add these as Segments to compare any other metrics. Here I have created a report comparing new users, returning users, views and bounce rate: