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 bd1d2e3
Show file tree
Hide file tree
Showing 4 changed files with 2,946 additions and 1,648 deletions.
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<script setup lang="ts">
import { decode, encode } from 'cbor-x';
import { Buffer } from 'node:buffer'
import { Buffer } from 'buffer'
const cborValue = ref('')
const jsonValue = ref('')
Expand Down
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.13.2",
"vue": "latest"
}
}
Loading

0 comments on commit bd1d2e3

Please sign in to comment.