Skip to content

Commit

Permalink
Merge pull request #9 from Azure/analytics
Browse files Browse the repository at this point in the history
Add Clarity analytics
lastcoolnameleft authored Oct 22, 2024
2 parents 2bcdb5d + fc68b16 commit eaf2040
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -56,6 +56,9 @@ markdown_extensions:
- pymdownx.tilde

extra:
analytics:
provider: clarity
property: aks-ctf
social:
- icon: fontawesome/brands/github-alt
link: https://github.com/azure/aks-ctf
15 changes: 15 additions & 0 deletions overrides/partials/integrations/analytics/custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script>
/* Add custom analytics integration here, e.g. */
var property = "{{ config.extra.analytics.property }}"

/* Wait for page to load and application to mount */
document.addEventListener("DOMContentLoaded", function() {
location$.subscribe(function(url) {
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "omtu0p3yhq");
})
})
</script>

0 comments on commit eaf2040

Please sign in to comment.