Skip to content

Commit

Permalink
Add Microsoft clarity as an analytics provider (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
wasi-master authored Jan 25, 2022
1 parent 8b4b400 commit 4b7b2ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions layout/_third-party/analytics/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
{%- include 'baidu-analytics.njk' -%}
{%- include 'growingio.njk' -%}
{%- include 'cloudflare.njk' -%}
{%- include 'microsoft-clarity.njk' -%}
3 changes: 3 additions & 0 deletions layout/_third-party/analytics/microsoft-clarity.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{%- if theme.clarity_analytics %}
<script async src="https://www.clarity.ms/tag/{{ theme.clarity_analytics }}"></script>
{%- endif %}

0 comments on commit 4b7b2ab

Please # to comment.