Skip to content

Commit

Permalink
♻️ Use @nuxt/scripts for GA
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Dec 14, 2024
1 parent 46efd0e commit 1445799
Show file tree
Hide file tree
Showing 3 changed files with 2,883 additions and 1,672 deletions.
16 changes: 12 additions & 4 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,27 @@ export default defineNuxtConfig({
],
link: [
{ rel: 'preload', as: 'script', href: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5384552213891537', crossorigin: 'anonymous' },
{ rel: 'preload', as: 'script', href: 'https://www.googletagmanager.com/gtag/js?id=G-PG6KXFFZPF' },
],
script: [
{ src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5384552213891537', async: true, crossorigin: 'anonymous', body: true },
],
},
},
modules: ["nuxt-gtag"],
gtag: {
id: "G-PG6KXFFZPF",

scripts: {
registry: {
googleAnalytics: {
id: 'G-PG6KXFFZPF',
},

}
},

devtools: { enabled: true },

experimental: {
clientNodeCompat: true,
},

modules: ["@nuxt/scripts"]
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nuxt-app",
"name": "cbor-json-web",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -10,9 +10,9 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
"@nuxt/scripts": "^0.9.5",
"cbor-x": "^1.5.9",
"nuxt": "^3.12.2",
"nuxt-gtag": "^2.0.6",
"nuxt": "^3.12.3",
"vue": "latest"
}
}
Loading

0 comments on commit 1445799

Please sign in to comment.