Skip to content

Commit

Permalink
Add analytics to 404 page template (#1477)
Browse files Browse the repository at this point in the history
* Add analytics to centralized 404 page

* Update 404.js
  • Loading branch information
Ruchika4 authored Nov 3, 2023
1 parent 2bc87c8 commit 91ea022
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/templates/404/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ async function get404(path) {
const main = document.body.querySelector('main');
main.append(section);
await loadArea(main);
import('../../martech/analytics.js').then((analytics) => {
document.querySelectorAll('main > div').forEach((area, idx) => analytics.decorateSectionAnalytics(area, idx));
});
}

async function getLegacy404() {
Expand Down

0 comments on commit 91ea022

Please sign in to comment.