Skip to content

Commit

Permalink
add GA4 tracking code
Browse files Browse the repository at this point in the history
  • Loading branch information
gocadimic committed Jul 7, 2023
1 parent 1c411dd commit c461e70
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ export default theme({
},
router: {
base: '/githubpages-doc-guidelines/'
}
},
plugins: [
'~~/plugins/gtag',
],
})
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"dependencies": {
"@nuxt/content-theme-docs": "^0.11.0",
"nuxt": "^2.15.8"
"nuxt": "^2.15.8",
"vue-gtag": "^1.16.1"
}
}
5 changes: 5 additions & 0 deletions plugins/gtag.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Vue from 'vue';
import VueGtag from 'vue-gtag';
Vue.use(VueGtag, {
config: { id: 'G-18TD1S8XWL' }
});

0 comments on commit c461e70

Please sign in to comment.