Skip to content

Commit

Permalink
[Chore] Update workers playground link tracking (#12505)
Browse files Browse the repository at this point in the history
  • Loading branch information
kodster28 authored Jan 12, 2024
1 parent 2e2a115 commit e7e54fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions assets/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export function zarazTrackDocEvents() {
const links = document.getElementsByClassName("DocsMarkdown--link");
const dropdowns = document.getElementsByTagName("details")
const glossaryTooltips = document.getElementsByClassName("glossary-tooltip")
const playgroundLinks = document.getElementsByClassName("playground-link")
addEventListener("DOMContentLoaded", () => {
if (links.length > 0) {
for (const link of links as any) { // Type cast to any for iteration
Expand Down Expand Up @@ -322,6 +323,13 @@ export function zarazTrackDocEvents() {
});
}
}
if (playgroundLinks.length > 0) {
for (const playgroundLink of playgroundLinks as any) {
playgroundLink.addEventListener("click", () => {
$zarazLinkEvent('playground link click', playgroundLink);
});
}
}
});
}

Expand Down

0 comments on commit e7e54fc

Please sign in to comment.