Skip to content

Commit

Permalink
feat: add google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed May 23, 2024
1 parent 6b3daa2 commit 9f24c89
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
pull_request:
workflow_dispatch:

env:
NUXT_SITE_ENV: staging # used for NuxtSEO to disable things like indexing on staging

jobs:
build_and_preview:
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
branches: [staging]

env:
NUXT_SITE_ENV: staging # used for NuxtSEO to disable things like indexing on staging

jobs:
build_and_deploy:
env:
Expand Down
Binary file modified bun.lockb
Binary file not shown.
12 changes: 8 additions & 4 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { zksyncIcons } from './assets/zksync-icons';
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
extends: ['@nuxt/ui-pro'],
modules: ['@nuxt/content', '@nuxt/ui', '@nuxt/fonts', '@nuxthq/studio', 'nuxt-og-image', '@nuxt/image'],
modules: ['@nuxt/content', '@nuxt/ui', '@nuxt/fonts', '@nuxthq/studio', 'nuxt-og-image', '@nuxt/image', 'nuxt-gtag'],
app: {
head: {
link: [{ rel: 'stylesheet', href: '/main.css' }],
Expand Down Expand Up @@ -37,9 +37,6 @@ export default defineNuxtConfig({
{ name: 'Fira Mono', provider: 'google' },
],
},
// routeRules: {
// '/api/search.json': { prerender: true },
// },
devtools: {
enabled: true,
},
Expand Down Expand Up @@ -78,4 +75,11 @@ export default defineNuxtConfig({
},
},
},
$production: process.env.NUXT_SITE_ENV
? {}
: {
gtag: {
id: 'G-QHP3K0NN1M',
},
},
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@nuxt/ui-pro": "^1.1.0",
"dayjs": "^1.11.10",
"nuxt": "^3.11.2",
"nuxt-gtag": "^2.0.6",
"nuxt-og-image": "^3.0.0-rc"
},
"devDependencies": {
Expand Down

0 comments on commit 9f24c89

Please sign in to comment.