mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Add umami and plausible analytics (#569)
This commit is contained in:
parent
06bdc81c47
commit
f10692067f
14
_config.yml
14
_config.yml
@ -702,6 +702,20 @@ matomo:
|
|||||||
server_url: # https://www.example.com/
|
server_url: # https://www.example.com/
|
||||||
site_id: # <your site id>
|
site_id: # <your site id>
|
||||||
|
|
||||||
|
# Umami Analytics
|
||||||
|
# See: https://umami.is/
|
||||||
|
umami:
|
||||||
|
enable: false
|
||||||
|
script_url: # https://umami.example.com/script.js
|
||||||
|
website_id: # <your website id>
|
||||||
|
|
||||||
|
# Plausible Analytics
|
||||||
|
# See: https://plausible.io/
|
||||||
|
plausible:
|
||||||
|
enable: false
|
||||||
|
script_url: # https://plausible.io/js/script.js
|
||||||
|
site_domain: # www.example.com
|
||||||
|
|
||||||
# Show number of visitors of each article.
|
# Show number of visitors of each article.
|
||||||
# You can visit https://www.leancloud.cn to get AppID and AppKey.
|
# You can visit https://www.leancloud.cn to get AppID and AppKey.
|
||||||
leancloud_visitors:
|
leancloud_visitors:
|
||||||
|
|||||||
2
layout/_third-party/analytics/index.njk
vendored
2
layout/_third-party/analytics/index.njk
vendored
@ -4,3 +4,5 @@
|
|||||||
{%- include 'cloudflare.njk' -%}
|
{%- include 'cloudflare.njk' -%}
|
||||||
{%- include 'microsoft-clarity.njk' -%}
|
{%- include 'microsoft-clarity.njk' -%}
|
||||||
{%- include 'matomo.njk' -%}
|
{%- include 'matomo.njk' -%}
|
||||||
|
{%- include 'umami.njk' -%}
|
||||||
|
{%- include 'plausible.njk' -%}
|
||||||
|
|||||||
3
layout/_third-party/analytics/plausible.njk
vendored
Normal file
3
layout/_third-party/analytics/plausible.njk
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{%- if theme.plausible %}
|
||||||
|
<script defer data-domain="{{ theme.plausible.site_domain }}" src="{{ theme.plausible.script_url }}"></script>
|
||||||
|
{%- endif %}
|
||||||
3
layout/_third-party/analytics/umami.njk
vendored
Normal file
3
layout/_third-party/analytics/umami.njk
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{%- if theme.umami %}
|
||||||
|
<script async defer data-website-id="{{ theme.umami.website_id }}" src="{{ theme.umami.script_url }}"></script>
|
||||||
|
{%- endif %}
|
||||||
Loading…
x
Reference in New Issue
Block a user