Skip to content

Commit

Permalink
Merge pull request #207 from companieshouse/feature/matomo-tracking-f…
Browse files Browse the repository at this point in the history
…or-cloudy-day

 IDVA3-2572 Matomo tracking for cloudy day screens
  • Loading branch information
kieo-ch authored Feb 6, 2025
2 parents ef6c1cc + e70dba4 commit 346f4c1
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 16 deletions.
4 changes: 3 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,7 @@ export const SessionKeys = {

// Matomo event IDs that occur more than once accross templates
export const CommonDataEventIds = {
CONTINUE_BUTTON: "continue-button"
CONTACT_US_LINK: "contact-us-link",
CONTINUE_BUTTON: "continue-button",
GO_BACK_AND_RETRY_LINK: "go-back-and-retry-link"
} as const;
2 changes: 1 addition & 1 deletion src/views/router_views/error/internal-server-error.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<p class="govuk-body">{{ i18n.500_try_again_later }}</p>
<p class="govuk-body">{{ i18n.500_when_available_start_again }}</p>
<p class="govuk-body">
<a href="{{ extraData[0] }}">{{ i18n.500_contact_us_1 }}</a> {{ i18n.500_contact_us_2 }}
<a href="{{ extraData[0] }}" data-event-id="{{ CommonDataEventIds.CONTACT_US_LINK }}">{{ i18n.500_contact_us_1 }}</a> {{ i18n.500_contact_us_2 }}
</p>
{% endblock %}
2 changes: 1 addition & 1 deletion src/views/router_views/error/page-not-found.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<p class="govuk-body">{{ i18n.404_check_typed_address }}</p>
<p class="govuk-body">{{ i18n.404_check_pasted_address }}</p>
<p class="govuk-body">
<a href="{{ extraData[0] }}">{{ i18n.404_arrived_via_bad_url_1 }}</a> {{ i18n.404_arrived_via_bad_url_2 }}
<a href="{{ extraData[0] }}" data-event-id="{{ CommonDataEventIds.CONTACT_US_LINK }}">{{ i18n.404_arrived_via_bad_url_1 }}</a> {{ i18n.404_arrived_via_bad_url_2 }}
</p>
{% endblock %}
4 changes: 3 additions & 1 deletion src/views/router_views/name_mismatch/name_mismatch.njk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

<p class="govuk-body">
{{ i18n.name_mismatch_details_par2 }}
<a href="https://www.gov.uk/file-changes-to-a-company-with-companies-house" class="govuk-link" rel="noreferrer noopener" target="_blank">{{ i18n.name_mismatch_details_par2_link }}</a>
<a href="https://www.gov.uk/file-changes-to-a-company-with-companies-house" class="govuk-link" rel="noreferrer noopener" target="_blank" data-event-id="update-name-on-register-link">
{{ i18n.name_mismatch_details_par2_link }}
</a>
{{- i18n.name_mismatch_details_par2_after_link }}
</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<p class="govuk-body">{{ i18n.service_unavailable_use }}{{ extraData[0] }}.</p>
<p class="govuk-body">{{ i18n.service_unavailable_when_available_start_again }}</p>
<p class="govuk-body">
<a href="{{ extraData[1] }}">{{ i18n.service_unavailable_contact_us_1 }}</a> {{ i18n.service_unavailable_contact_us_2 }}
<a href="{{ extraData[1] }}" data-event-id="{{ CommonDataEventIds.CONTACT_US_LINK }}">{{ i18n.service_unavailable_contact_us_1 }}</a> {{ i18n.service_unavailable_contact_us_2 }}
</p>
{% endblock %}
6 changes: 3 additions & 3 deletions src/views/router_views/stopScreen/company-status.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<p class="govuk-body">{{ extraData[0] }}{{ i18n.company_status_statement_1 }}</p>
<p class="govuk-body">{{ i18n.company_status_statement_2 }}</p>
<p class="govuk-body">{{ i18n.company_status_wrong_company_action }}
<a id="go-back-enter-number" href="{{ extraData[1] }}">{{ i18n.company_status_wrong_company_action_text -}}</a>.
<a id="go-back-enter-number" href="{{ extraData[1] }}" data-event-id="{{ CommonDataEventIds.GO_BACK_AND_RETRY_LINK }}">{{ i18n.company_status_wrong_company_action_text -}}</a>.
</p>
<p class="govuk-body">
<a id="contact-us" href="{{ extraData[2] }}">{{ i18n.company_status_contact_us_text -}}</a>
<a id="contact-us" href="{{ extraData[2] }}" data-event-id="{{ CommonDataEventIds.CONTACT_US_LINK }}">{{ i18n.company_status_contact_us_text -}}</a>
{{ i18n.company_status_contact_us }}
</p>

{% endblock %}
{% endblock %}
6 changes: 3 additions & 3 deletions src/views/router_views/stopScreen/company-type.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<li>{{ i18n.company_type_allowed_4 }}</li>
</ul>
<p class="govuk-body">{{ i18n.company_type_wrong_company_action }}
<a id="go-back-enter-number" href="{{ extraData[1] }}">{{ i18n.company_type_wrong_company_action_text -}}</a>.
<a id="go-back-enter-number" href="{{ extraData[1] }}" data-event-id="{{ CommonDataEventIds.GO_BACK_AND_RETRY_LINK }}">{{ i18n.company_type_wrong_company_action_text -}}</a>.
</p>
<p class="govuk-body">
<a id="contact-us" href="{{ extraData[2] }}">{{ i18n.company_type_contact_us_text -}}</a>
<a id="contact-us" href="{{ extraData[2] }}" data-event-id="{{ CommonDataEventIds.CONTACT_US_LINK }}">{{ i18n.company_type_contact_us_text -}}</a>
{{ i18n.company_type_contact_us }}
</p>

{% endblock %}
{% endblock %}
2 changes: 1 addition & 1 deletion src/views/router_views/stopScreen/empty-psc-list.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1 class="govuk-heading-l">{{ i18n.ind_psc_list_main_title }}</h1>
<p class="govuk-body">
{{ i18n.empty_psc_list_body }}
<a href="https://www.gov.uk/guidance/people-with-significant-control-pscs">
<a href="https://www.gov.uk/guidance/people-with-significant-control-pscs" data-event-id="guidance-link">
{{ i18n.empty_psc_list_link }}
</a>.
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/views/router_views/stopScreen/psc-dob-mismatch.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<h3 class="govuk-heading-s">{{ i18n.dob_mismatch_check_personal_code }}</h3>
<p class="govuk-body">
{{ i18n.dob_mismatch_character_code }}
<a id="reenter-personal-code" href="{{ backURL }}" title="{{ i18n.dob_mismatch_try_again_link }}" class="govuk-link" data-event-id="try-again-link">
<a id="reenter-personal-code" href="{{ backURL }}" title="{{ i18n.dob_mismatch_try_again_link }}" class="govuk-link" data-event-id="{{ CommonDataEventIds.GO_BACK_AND_RETRY_LINK }}">
{{ i18n.dob_mismatch_try_again_link_text -}}
</a>.
</p>
Expand All @@ -27,4 +27,4 @@
<h3 class="govuk-heading-s">{{ i18n.dob_mismatch_authorised_agent }}</h3>
<p class="govuk-body">{{ i18n.dob_mismatch_verified_identity }}</p>

{% endblock %}
{% endblock %}
4 changes: 2 additions & 2 deletions src/views/router_views/stopScreen/super-secure.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<p class="govuk-body">{{ i18n.super_secure_statement_1 }}</p>
<p class="govuk-body">{{ i18n.super_secure_statement_2 }}</p>
<p class="govuk-body">{{ i18n.super_secure_statement_3_1 }}
<a id="mail-to-dsr" href="mailto:{{ extraData[0] }}" target="_blank" >{{ extraData[0] }}</a>
<a id="mail-to-dsr" href="mailto:{{ extraData[0] }}" target="_blank" data-event-id="dsr-mailto-link">{{ extraData[0] }}</a>
{{ i18n.super_secure_statement_3_2 }}
{{ extraData[1] }}{{ i18n.super_secure_statement_3_3 }}
</p>

{% endblock %}
{% endblock %}

0 comments on commit 346f4c1

Please sign in to comment.