Skip to content

Commit

Permalink
chore(analytics): adding analytics (#344)
Browse files Browse the repository at this point in the history
* feat: adding analytics

* fix: build fix, changing node to 18

---------

Co-authored-by: Ramon Canales <rc@matterlabs.dev>
  • Loading branch information
githubdoramon and Ramon Canales authored Jan 12, 2024
1 parent 545d504 commit bb7a9b3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: "Setup node@14"
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18

- name: "Install dependencies"
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: "Setup node@14"
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18

- name: "Install dependencies"
run: |
Expand Down
2 changes: 2 additions & 0 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ export default {
extraWatchFiles: ['.vuepress/config/**'],
head: [
['script', { src: '/hack.js', defer: "defer" }, ''],
['script', { src: 'https://www.googletagmanager.com/gtag/js?id=G-K9FLXQ2PYF', async: "true" }, ''],
['script', { src: '/analytics.js', async: "true" }, ''],
['link', { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
['link', { rel: 'apple-touch-icon', sizes: '57x57', type: 'image/x-icon', href: '/apple-icon-57x57.png' }],
['link', { rel: 'apple-touch-icon', sizes: '60x60', type: 'image/x-icon', href: '/apple-icon-60x60.png' }],
Expand Down
5 changes: 5 additions & 0 deletions docs/.vuepress/public/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-K9FLXQ2PYF');
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
]
},
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"docs:deploy": "yarn docs:build && firebase deploy",
"docs:dev": "NODE_OPTIONS=--openssl-legacy-provider vuepress dev docs",
"docs:build": "NODE_OPTIONS=--openssl-legacy-provider vuepress build docs",
"docs:deploy": "NODE_OPTIONS=--openssl-legacy-provider yarn docs:build && firebase deploy",
"cspell": "cspell lint --no-summary --fail-fast --no-progress --no-must-find-files -c cspell.json docs/**/*.md ",
"md:lint": "markdownlint --config .markdownlintrc ./docs/**/*.md",
"md:fix": "markdownlint --fix -c .markdownlintrc ./docs/**/*.md",
Expand Down

0 comments on commit bb7a9b3

Please sign in to comment.