Inline script for GA4

This commit is contained in:
Matan Kushner
2023-06-06 19:23:58 -04:00
parent abadd9c58d
commit 1dab919c9f
3 changed files with 13 additions and 26 deletions
+13 -6
View File
@@ -116,6 +116,19 @@ module.exports = defineConfig({
}],
["meta", { name: "twitter:image", content: "https://starship.rs/icon.png" }],
["meta", { name: "twitter:alt", content: "Starship: Cross-Shell Prompt" }],
// Google Analytics
[
'script',
{
async: true,
src: 'https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX',
},
],
[
'script',
{},
"window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-N3M0VJ9NL6');",
],
],
evergreen: true,
theme: "default-prefers-color-scheme",
@@ -350,12 +363,6 @@ module.exports = defineConfig({
},
},
plugins: [
[
"@vuepress/google-analytics",
{
ga: "G-N3M0VJ9NL6",
},
],
[
"vuepress-plugin-sitemap",
{