You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/analytics.md
+50-1Lines changed: 50 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,55 @@ Google Analytics 4 is added via Google Tag Manager and is loaded on all pages.
6
6
7
7
## Google Tag Manager
8
8
9
-
[Google Tag Manager](https://developers.google.com/tag-platform/tag-manager/web) is loaded on all pages.
9
+
[Google Tag Manager](https://developers.google.com/tag-platform/tag-manager/web) is loaded on all pages once a user has consented to analytics cookies.
10
10
11
11
There is a script loaded in the `<head>` at [shared/\_head_analytics.html.haml](../app/views/shared/_head_analytics.html.haml) and a `<noscript>` variant loaded in the `<body>` at [shared/\_google_tag_manager_no_script.html.haml](../app/views/shared/_google_tag_manager_no_script.html.haml).
12
+
13
+
## Analytics configuration by app
14
+
### Energy Customer Service Ratings Table
15
+
Special gtm classes have been added to certain elements in order to facilitate better analytics.
16
+
17
+
The inclusion of class `gtm-supplier-table-row` means that we can track how many users click on 'More details' for a specific supplier.
18
+
19
+
Class `gtm-select-unranked-supplier` allows us to track how many users search for an unranked supplier. We would not be able to track this behaviour without this class, as the unranked supplier information opens in the main supplier table page.
20
+
21
+
Finally, class `gtm-show-more-suppliers` allows us to track interactions with the 'Show more suppliers' button on the mobile view of the main supplier table page. By default only the top 5 suppliers are displayed on mobile view, and users can click 'Show more suppliers' if they want to see the full table.
22
+
23
+
No bespoke gtm events have been created for the CSR table.
24
+
25
+
### Appliance Calculator
26
+
The appliance calculator uses custom GTM events to track user engagement with the tool. When debugging in GTM you should use the URL of the iframe i.e. `/appliance-calculator` rather than the advice collection in which it is embedded.
| Next button clicked |`app_calc_next_button_click`| The name of the step on when clicked |`appliance`, `time_usage`, `cyclical_usage`, `unit_rate`|
32
+
| Previous button clicked |`app_calc_previous_button_click`| The name of the step on when clicked |`appliance`, `time_usage`, `cyclical_usage`, `unit_rate`|
33
+
| Add another appliance clicked |`app_calc_add_another_appliance`| Fixed text |`add_another_appliance_click`|
34
+
| Clear list clicked |`app_calc_clear_list`| Fixed text |`clear_list_click`|
35
+
| Most expensive appliance message shown |`app_calc_most_expensive_appliance`| The name of the appliance that is most expensive |`TEST _ Fan heater`, `TEST _ Tumble dryer (condenser)`|
36
+
| Appliance added to the list |`app_calc_appliance_added`| The message shown in the green box |`TEST _ Fan heater added to the list below`|
37
+
| An error is displayed |`app_calc_form_error`| The error message |`Select an appliance from the list`|
38
+
39
+
#### Analytics Reports
40
+
An [exploration report has been set up to display appliance calculator data](https://analytics.google.com/analytics/web/#/analysis/p284911746/edit/Lf8bsW4-RDSKqB0-K7W2pg).
41
+
42
+
You can get to it from the main page by following: `Explore` > `Appliance Calculator`.
43
+
44
+
There are five tabs in the exploration:
45
+
1.**Events** - shows total count of all of the tracked events, broken down by event.
46
+
2.**Form navigation** - shows total number of `Next` and `Previous` button clicks, broken down by form step (see form url to step table below).
47
+
3.**Errors** - lists all the unique error messages logged and count
48
+
4.**Added appliances** - lists all the added appliances logged and count
49
+
5.**Most expensive** - lists all the most expensive appliance messages displayed and count
50
+
51
+
##### Form url to step
52
+
The exploration report only shows URLs. These can be converted into steps using the table below:
0 commit comments