feat: add Umami analytics, attribution footer & GitHub Sponsors#161
Open
chicogong wants to merge 1 commit into
Open
feat: add Umami analytics, attribution footer & GitHub Sponsors#161chicogong wants to merge 1 commit into
chicogong wants to merge 1 commit into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for localtools ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
5313034 to
bb060e1
Compare
bb060e1 to
93e0626
Compare
1. Umami Analytics (privacy-friendly, no cookies) - injectAnalytics() in tool-chrome.js covers all 1120 tool pages - Inline loader in index.html for the main page - ID injected via Vercel env var UMAMI_SITE_ID at deploy time (never in source) - data-domains uses location.hostname (fork-friendly, no hardcoded domain) - Theme toggle custom event tracking (umami.track) 2. Attribution footer (anti-mirroring) - 'Powered by WebUtils · chicogong' injected via tool-chrome.js - #tbCredit styled in tool-base.css (fixed bottom, subtle, hover effect) 3. GitHub Sponsors - Add github: [chicogong] to FUNDING.yml alongside existing 爱发电 4. Vercel deployment - Add build.sh to inject UMAMI_SITE_ID from env var - Add buildCommand + outputDirectory to vercel.json
93e0626 to
4afbc4d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动内容
1. Umami Analytics(隐私友好统计)
tool-chrome.js新增injectAnalytics(),覆盖全部 1120 工具页index.html新增内联 analytics loaderUMAMI_SITE_ID注入data-domains使用location.hostname(不硬编码域名,fork 友好)umami.track("theme_toggle")2. 底部署名(防搬运)
tool-chrome.js注入 "Powered by WebUtils · chicogong"tool-base.css新增#tbCredit样式(fixed bottom, subtle, hover effect)3. GitHub Sponsors
FUNDING.yml新增github: [chicogong](保留原有爱发电)4. Vercel 部署
build.sh:部署时从UMAMI_SITE_ID环境变量注入 IDvercel.json新增buildCommand+outputDirectory激活步骤
UMAMI_SITE_ID文件变更
assets/js/tool-chrome.jsassets/css/tool-base.cssindex.htmlbuild.shvercel.json.github/FUNDING.yml