Skip to content

Commit

Permalink
Merge pull request #184 from companieshouse/fix-1622
Browse files Browse the repository at this point in the history
updated print button matomo analytic
  • Loading branch information
hemerem-ch authored Feb 25, 2025
2 parents 2469c9c + 565a114 commit 11aa015
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/views/partials/print_button.njk
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,20 @@
<!-- Calling Matomo event script to capture event actions based on page title -->
<script nonce={{ nonce | dump | safe }}>
// Add event listener to print screen button
document.getElementById("print-button")
.addEventListener("click", () => {
_paq.push(["trackEvent", "{{title}}", "Print identity verification details"]);
});
</script>

<script nonce={{ nonce | dump | safe }}>
document.getElementById("print-button")
.addEventListener("click", () => {
window.print()
});
</script>
</script>

0 comments on commit 11aa015

Please sign in to comment.