Browse Source

Replaced Cloudflare analytics with Mamato

master
Quang Thang 1 year ago
parent
commit
b9bb26312d
  1. 6
      _config.yml
  2. 27
      _includes/footer_custom.html

6
_config.yml

@ -100,9 +100,11 @@ gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into t
# Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define
color_scheme: nil
# Cloudflare Analytics
# Mamato Analytics
cf_tracking: a3bc8207481e41caad5cb16558187c6b
mamato_enabled: true
mamato_url: "https://track.quangthang.men"
mamato_site_id: 2
# Katex
katex:

27
_includes/footer_custom.html

@ -1,9 +1,26 @@
{%- if site.footer_content -%}
<p class="text-small text-grey-dk-100 mb-0">{{ site.footer_content }}</p>
{% if site.cf_tracking != nil %}
<!-- Cloudflare Web Analytics -->
<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "{{ site.cf_tracking }}"}'>
{% if site.mamato_enabled == true %}
</script>
<!-- End Cloudflare Web Analytics -->
{% endif %}
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="{{ site.mamato_url }}/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '{{ site.mamato_site_id }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<noscript>
<!-- Matomo Image Tracker-->
<img referrerpolicy="no-referrer-when-downgrade" src="{{ site.mamato_url }}/matomo.php?idsite={{ site.mamato_site_id }}&amp;rec=1" style="border:0" alt="" />
<!-- End Matomo -->
</noscript>
{% endif %}
{%- endif -%}

Loading…
Cancel
Save