Merge pull request #261 from jac18281828/clarity

Flex-260: Add support for Microsoft Clarity
This commit is contained in:
Alexandre Vicenzi 2021-02-03 11:51:02 +01:00 committed by GitHub
commit 53dfadbe3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View file

@ -33,6 +33,7 @@ The minimalist [Pelican](http://blog.getpelican.com/) theme.
- [Matomo Analytics (formerly Piwik)](https://matomo.org/)
- [StatusCake](https://www.statuscake.com/)
- [Isso](https://posativ.org/isso/) (new in 2.3.0)
- [Microsoft Clarity](https://clarity.microsoft.com)
## Plugins Support

View file

@ -152,6 +152,9 @@
{% if GOOGLE_TAG_MANAGER %}
{% include "partial/gtm.html" %}
{% endif %}
{% if MICROSOFT_CLARITY %}
{% include "partial/clarity.html" %}
{% endif %}
</head>
<body {% if not THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE %}class="{{ THEME_COLOR|default('light') }}-theme"{% endif %}>
{% if GOOGLE_TAG_MANAGER %}

View file

@ -0,0 +1,7 @@
<script type="text/javascript">
(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", "{{ MICROSOFT_CLARITY }}");
</script>