Add Microsoft clarity as an analytics provider (#451)

This commit is contained in:
Wasi Master 2022-01-25 22:50:55 +06:00 committed by GitHub
parent 8b4b4004c1
commit 4b7b2ab907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -682,6 +682,10 @@ growingio_analytics: # <project_id>
# See: https://www.cloudflare.com/web-analytics/
cloudflare_analytics:
# Microsoft Clarity Analytics
# See: https://clarity.microsoft.com/
clarity_analytics: # <project_id>
# Show number of visitors of each article.
# You can visit https://www.leancloud.cn to get AppID and AppKey.
leancloud_visitors:

View File

@ -2,3 +2,4 @@
{%- include 'baidu-analytics.njk' -%}
{%- include 'growingio.njk' -%}
{%- include 'cloudflare.njk' -%}
{%- include 'microsoft-clarity.njk' -%}

View File

@ -0,0 +1,3 @@
{%- if theme.clarity_analytics %}
<script async src="https://www.clarity.ms/tag/{{ theme.clarity_analytics }}"></script>
{%- endif %}