gtm
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
_site/
|
||||
node_modules/
|
||||
.env
|
||||
7
_data/process.js
Normal file
7
_data/process.js
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
require('dotenv').config()
|
||||
module.exports = function() {
|
||||
return {
|
||||
env: process.env
|
||||
};
|
||||
};
|
||||
9
_includes/gtm.njk
Normal file
9
_includes/gtm.njk
Normal file
@@ -0,0 +1,9 @@
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-0XH9HYVENB"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-0XH9HYVENB');
|
||||
</script>
|
||||
@@ -2,6 +2,10 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
{% if process.env.DISABLE_GTM and process.env.DISABLE_GTM !== "false" %}
|
||||
{% else %}
|
||||
{% include "gtm.njk" %}
|
||||
{% endif %}
|
||||
|
||||
<title>{{ title or metadata.title }}</title>
|
||||
{% include './meta.njk' %}
|
||||
|
||||
13
package-lock.json
generated
13
package-lock.json
generated
@@ -15,6 +15,7 @@
|
||||
"@11ty/eleventy-plugin-bundle": "^1.0.4",
|
||||
"@11ty/eleventy-plugin-rss": "^1.2.0",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"html-minifier": "^4.0.0",
|
||||
"luxon": "^3.3.0",
|
||||
"markdown-it-anchor": "^8.6.7"
|
||||
@@ -1007,6 +1008,18 @@
|
||||
"url": "https://github.com/fb55/domutils?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.3.1",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
|
||||
"integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/motdotla/dotenv?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/duplexer": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
"@11ty/eleventy-plugin-bundle": "^1.0.4",
|
||||
"@11ty/eleventy-plugin-rss": "^1.2.0",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"html-minifier": "^4.0.0",
|
||||
"luxon": "^3.3.0",
|
||||
"markdown-it-anchor": "^8.6.7"
|
||||
|
||||
Reference in New Issue
Block a user