Skip to content

Commit

Permalink
update analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
staghouse committed Feb 18, 2024
1 parent 0cc0a07 commit 6313659
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
18 changes: 11 additions & 7 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
env: {
flushSettings: process.env.FLUSH_SETTINGS || false
flushSettings: process.env.FLUSH_SETTINGS || false,
},
/*
** Headers of the page
Expand Down Expand Up @@ -44,7 +44,16 @@ module.exports = {
type: 'image/x-icon',
href: '/images/favicons/favicon.ico',
},
]
],
script: [
{
src: 'https://www.googletagmanager.com/gtag/js?id=G-W9T9V40P4Z',
async: true,
},
{
src: 'js/ga.js',
},
],
},
/*
** Customize the progress bar color
Expand All @@ -68,9 +77,4 @@ module.exports = {
}
},
},
modules: [/*'~/io', */ '@nuxtjs/google-analytics'],

'google-analytics': {
id: 'UA-119957645-1',
}
};
8 changes: 8 additions & 0 deletions static/js/ga.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'G-W9T9V40P4Z');

0 comments on commit 6313659

Please sign in to comment.