add analytics
This commit is contained in:
5
layouts/partials/analytics/cloudflare.html
Normal file
5
layouts/partials/analytics/cloudflare.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<script
|
||||||
|
defer
|
||||||
|
src="https://static.cloudflareinsights.com/beacon.min.js"
|
||||||
|
data-cf-beacon='{"token": "{{ site.Params.analytics.cloudflare.id }}"}'
|
||||||
|
></script>
|
5
layouts/partials/analytics/fathom.html
Normal file
5
layouts/partials/analytics/fathom.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<script
|
||||||
|
src="https://cdn.usefathom.com/script.js"
|
||||||
|
data-site="{{ site.Params.analytics.fathom.id }}"
|
||||||
|
defer
|
||||||
|
></script>
|
12
layouts/partials/analytics/google.html
Normal file
12
layouts/partials/analytics/google.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.Params.analytics.google.id }}"></script>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag() {
|
||||||
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtag('js', new Date());
|
||||||
|
gtag('config', '{{ site.Params.analytics.google.id }}');
|
||||||
|
});
|
||||||
|
</script>
|
Reference in New Issue
Block a user