Skip to content

v1.11.0

Choose a tag to compare

@ccvar ccvar released this 20 Oct 11:03
· 16 commits to main since this release

在后台把站点接入 Google Search Console 和 Bing:用 Cloudflare DNS 自动验证所有权,再添加站点、提交站点地图;热门搜索词多了地区、隐藏域名,并且每天自动更新。

新功能

  • 接入 Search Console / Bing:站点列表右上角“+ → 接入 Search Console / Bing”、站点列表里灰色的 Search Console / Bing 图标、站点详情的“接入搜索引擎”,或者新建 GA4 站点之后
    • 验证网站所有权 → 添加站点 → 从 robots.txt 或常见地址找到站点地图并提交,接入后站点直接出现在列表里
    • Cloudflare DNS 自动验证:域名在你的 Cloudflare 账号里时,自动加验证记录(Google 一条 TXT,验证整个域名,含 www 和子域名;Bing 一条 CNAME),网站代码不用改;DNS 还没生效时显示“验证中”,弹窗开着时每 30 秒再试,定时任务每小时再试
    • 页面标签:不在 Cloudflare 的域名,取 Google 和 Bing 的 meta 标签贴到网站首页,再验证
    • 批量接入:列出所有还没接入的站点,显示接入时间(GA4 开始统计的时间,新站点在前),各列可以排序,勾选后一起接入;也可以手动加其他域名
  • 热门搜索词 · 地区:新的“地区”标签,按搜索的人所在的国家 / 地区统计热度(只有 Google 的数据),可以排序、筛选、导出
  • 热门搜索词 · 隐藏站点域名:截图、分享时不显示站点名,导出也不带站点列

改进

  • 热门搜索词的数据缓存 24 小时,定时任务每天自动更新(最近 28 天);显示数据更新时间,可以手动刷新;站点多时自动分批加载并显示进度,不用再点“继续加载”
  • 设置里“Cloudflare 用量”和 DNS 自动验证合并成一项“Cloudflare”,共用一个令牌(令牌带上“区域 · DNS · 编辑”即可),也可以单独填一个只管 DNS 的令牌;“在 Cloudflare 创建令牌”的链接预先填好所需权限
  • Cloudflare 令牌出错时分清“令牌无效”和“令牌有效但读不到域名”,并附上 Cloudflare 的原话

修复

  • 在 Google 授权页取消、返回后台后,“重新授权”按钮点不了

升级提示

  • 接入 Search Console 需要在 Google Cloud 项目里启用 Site Verification API,并在后台重新授权一次 Google 账号(多了“网站验证”权限)
  • DNS 自动验证需要 Cloudflare 令牌带“区域 · DNS · 编辑”权限(不是“DNS 设置”),区域资源选“所有区域”
  • 数据库会自动补上新表,不用手动操作

Add sites to Google Search Console and Bing from the admin: ownership is verified automatically through Cloudflare DNS, then the site is added and its sitemaps submitted. Top queries gain a region tab, a hide-domains toggle and daily automatic updates.

New

  • Add to Search Console / Bing: "+ → Add to Search Console / Bing" at the top right of the Sites list, the gray Search Console / Bing icons in the list, "Add to search engines" on a site page, or right after creating a GA4 site
    • Verifies site ownership → adds the site → finds sitemaps in robots.txt or common locations and submits them; the site then shows up in the list
    • Automatic Cloudflare DNS verification: for domains in your Cloudflare account, verification records are added automatically (a TXT for Google, verifying the whole domain including www and subdomains; a CNAME for Bing), with no change to the site's code. While DNS hasn't taken effect, the status shows "Verifying" and is retried every 30 seconds while the dialog is open and hourly by the cron
    • Page tags: for domains not on Cloudflare, paste the Google and Bing meta tags into the home page, then verify
    • Bulk: lists every site not yet added, with its connection date (when GA4 started tracking it, newest first) and sortable columns; select sites and add them together, or add other domains by hand
  • Top queries · Regions: a new "Regions" tab shows popularity by the searcher's country / region (Google data only), with sorting, filtering and export
  • Top queries · Hide site domains: hides site names for screenshots and sharing; exports leave out the site columns too

Improved

  • Top queries data is cached for 24 hours and refreshed daily by the cron (last 28 days); the update time is shown with a manual refresh button; with many sites, batches load automatically with progress, no more "Load more"
  • Settings: "Cloudflare usage" and automatic DNS verification are merged into one "Cloudflare" item sharing a single token (add "Zone · DNS · Edit" to it), or use a separate DNS-only token; the "Create token in Cloudflare" link prefills the needed permissions
  • Cloudflare token errors now distinguish "invalid token" from "valid token that can't read domains", with Cloudflare's own message

Fixed

  • After cancelling on Google's consent page and returning, the "Re-authorize" button couldn't be clicked

Upgrade notes

  • Adding sites to Search Console needs the Site Verification API enabled in your Google Cloud project, and re-authorizing your Google account once in the admin (it now includes "site verification")
  • Automatic DNS verification needs a Cloudflare token with "Zone · DNS · Edit" (not "DNS Settings") and Zone Resources set to "All zones"
  • The database adds the new table automatically; nothing to do by hand

升级方法 / How to upgrade: https://github.com/ccvar/cligc_link#升级