kmesh-net/website

Hardcoded Google Analytics Tracking ID

开放

#252 创建于 2025年11月5日

 (8 条评论) (1 个反应) (2 位负责人)JavaScript (71 个派生)auto 404
good first issue

仓库指标

星标
 (11 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Task description:

  • The docusaurus.config.js file currently includes a hardcoded Google Analytics tracking ID.
  • Although it’s not sensitive, it’s better practice to load it from an environment variable instead of committing it to source control.

Current: trackingID: "G-XXXXXXX",

Proposed: trackingID: process.env.GA_TRACKING_ID,

Solution:

  • Remove hardcoded ID
  • Add GA_TRACKING_ID to GitHub Secrets
  • Update build workflow to use the secret

GitHub Actions example:

- name: Build Docusaurus
  run: npm run build
  env:
    GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}

Who can join or take the task:

The good first issue is intended for first-time contributors to get started on his/her contributor journey.

After a contributor has successfully completed 1-2 good first issue's, they should be ready to move on to help wanted items, saving the remaining good first issue for other new contributors.

How to join or take the task:

Just reply on the issue with the message /assign in a separate line.

Then, the issue will be assigned to you.

How to ask for help:

If you need help or have questions, please feel free to ask on this issue. The issue author or other members of the community will guide you through the contribution process.

贡献者指南