Skip to content

Commit

Permalink
feat: adding analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon Canales committed Jan 12, 2024
1 parent e3d6d7a commit 2d592db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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');

0 comments on commit 2d592db

Please sign in to comment.