Skip to content

Commit

Permalink
Add google analytics (#85)
Browse files Browse the repository at this point in the history
Resolves DEVRL-697


https://linear.app/matterlabs/issue/DEVRL-697/add-analytics-to-zksync-docs

## List of changes

- Add Google Analytics
  - Analytics is disabled for non-production environments
  • Loading branch information
itsacoyote authored May 23, 2024
1 parent 1955cc4 commit e742ea5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
run: bun install
- name: "Deploy target: staging"
run: bun run build
# TODO: ask about below
# env:
# RUDDERSTACK_WRITE_KEY: "${{ secrets.RUDDERSTACK_WRITE_KEY }}"
# RUDDERSTACK_DATA_PLANE_URL: "${{ secrets.RUDDERSTACK_DATA_PLANE_URL }}"

- uses: matter-labs/action-hosting-deploy@main
with:
Expand Down
Binary file modified bun.lockb
Binary file not shown.
9 changes: 8 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
extends: [['github:matter-labs/docs-nuxt-template', { install: true }], ['github:zksync-sdk/sdk-docs#staging']],
modules: ['@nuxt/content', '@nuxt/ui', '@nuxt/eslint', '@nuxtjs/seo'],
modules: ['@nuxt/content', '@nuxt/ui', '@nuxt/eslint', '@nuxtjs/seo', 'nuxt-gtag'],
site: {
name: 'zkSync Docs',
url: process.env.NUXT_SITE_ENV ? 'https://staging-docs.zksync.io' : 'https://docs.zksync.io',
Expand Down Expand Up @@ -35,4 +35,11 @@ export default defineNuxtConfig({
'/zk-stack/concepts': { redirect: '/zk-stack/concepts/transaction-lifecycle' },
'/zk-stack/running-a-zk-chain': { redirect: '/zk-stack/running-a-zk-chain/locally' },
},
$production: process.env.NUXT_SITE_ENV
? {}
: {
gtag: {
id: 'G-ELFWXSL45V',
},
},
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@tsparticles/slim": "^3.3.0",
"@tsparticles/vue3": "^3.0.1",
"nuxt": "^3.11.2",
"nuxt-gtag": "^2.0.6",
"nuxt-og-image": "^3.0.0-rc.45",
"rehype-katex": "^7.0.0",
"remark-math": "^6.0.0",
Expand Down

0 comments on commit e742ea5

Please sign in to comment.