summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fred K. Schott <fkschott@gmail.com> 2021-06-08 14:28:29 -0700
committerGravatar Fred K. Schott <fkschott@gmail.com> 2021-06-08 14:28:29 -0700
commit5973cc763d2b09a0f6c540f381688fed1d247d3f (patch)
tree4005b0589a3ef41f7fcf3e8ac8b007228bef3917
parentbad8b32df7e02afa01c379cdb5bc122dc32b5328 (diff)
downloadastro-5973cc763d2b09a0f6c540f381688fed1d247d3f.tar.gz
astro-5973cc763d2b09a0f6c540f381688fed1d247d3f.tar.zst
astro-5973cc763d2b09a0f6c540f381688fed1d247d3f.zip
add anayltics script
-rw-r--r--packages/astro/README.md4
-rw-r--r--www/package.json4
-rw-r--r--www/src/pages/blog/introducing-astro.astro10
-rw-r--r--www/src/pages/index.astro10
4 files changed, 24 insertions, 4 deletions
diff --git a/packages/astro/README.md b/packages/astro/README.md
index ede32d397..a4082a15b 100644
--- a/packages/astro/README.md
+++ b/packages/astro/README.md
@@ -30,8 +30,8 @@ The default Astro project has the following `scripts` in the `/package.json` fil
```json
{
"scripts": {
- "start": "astro dev .",
- "build": "astro build ."
+ "start": "astro dev",
+ "build": "astro build"
}
}
```
diff --git a/www/package.json b/www/package.json
index 04fa10dcc..e9426b700 100644
--- a/www/package.json
+++ b/www/package.json
@@ -2,8 +2,8 @@
"name": "www",
"version": "1.1.0",
"scripts": {
- "start": "astro dev .",
- "build": "astro build ."
+ "start": "astro dev",
+ "build": "astro build"
},
"devDependencies": {
"astro": "^0.12.10"
diff --git a/www/src/pages/blog/introducing-astro.astro b/www/src/pages/blog/introducing-astro.astro
index 2e768c780..bc87a41bc 100644
--- a/www/src/pages/blog/introducing-astro.astro
+++ b/www/src/pages/blog/introducing-astro.astro
@@ -115,6 +115,16 @@ npm start
</Note>
</Markdown>
</BlogPost>
+
+ <!-- Global site tag (gtag.js) - Google Analytics -->
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-TEL60V1WM9"></script>
+ <script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', 'G-TEL60V1WM9');
+ </script>
</body>
</html>
diff --git a/www/src/pages/index.astro b/www/src/pages/index.astro
index eaa88702f..e2d07691e 100644
--- a/www/src/pages/index.astro
+++ b/www/src/pages/index.astro
@@ -78,5 +78,15 @@ let permalink = 'https://astro.build/';
<script>
console.log('%cGet early Astro access 👉 https://astro.build/chat', "color:#17c083; font-size: 1.2em; padding: 1em;");
</script>
+
+ <!-- Global site tag (gtag.js) - Google Analytics -->
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-TEL60V1WM9"></script>
+ <script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', 'G-TEL60V1WM9');
+ </script>
</body>
</html>