[WordPress] 外掛分享: CAOS | Host Google Analytics Locally

WordPress 外掛 CAOS | Host Google Analytics Locally 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「CAOS | Host Google Analytics Locally」是 2016-05-05 上架。
  • 目前有 10000 個安裝啟用數。
  • 上一次更新是 2025-05-01,距離現在已有 6 天。
  • 外掛最低要求 WordPress 4.6 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
  • 有 127 人給過評分。
  • 論壇上目前有 2 個提問,問題解答率 100% ,不低,算是個很有心解決問題的開發者團隊了!

外掛協作開發者

daanvandenbergh |

外掛標籤

GDPR | gtag | google | minimal | analytics |

內容簡介

CAOS(完整的 Google Analytics 最佳化套件)允許您在本地主機上托管 analytics.js/gtag.js 檔案,並使用 WordPress 內建的 Cron 計劃自動更新。完全自動化!

如果您不是 Google Analytics 的重度使用者,只是對您的網頁瀏覽量感到好奇?CAOS 完全支援 Minimal Analytics,即 Google Analytics Lite。這是 Google Analytics 預設庫(analytics.js/gtag.js)的一個極輕型替代品。Minimal Analytics 還可以幫助您擺脫 Google PageSpeed Insights 中令人惱人的未使用 JavaScript 警告!

每當您在 Google Pagespeed Insights、Pingdom 或 GTMetrix 上分析您的網站時,都會告訴您在使用 Google Analytics 時要利用瀏覽器快取,因為 Google 將快取過期時間設定為 2 小時。這個外掛能夠讓您在 Pagespeed 和 Pingdom 上得到更高的分數,並使您的網站加載更快,因為瀏覽器不需要從 Google 的外部服務器進行回程下載。

只需安裝外掛,輸入您的追蹤 ID,外掛就會將必要的 Google Analytics 追蹤代碼添加到您的佈景主題標頭(或頁腳),並下載並保存 analytics.js/gtag.js 檔案到您的網站伺服器中,並自動保持更新(使用 wp_cron() 中的定期腳本)。或者,如果您想使用另一個外掛來使用本地托管檔案,可以在進階設定下勾選相容性模式,無論哪種方法,CAOS 都是一個設置後可以不再理會的外掛。

欲知更多信息,請參閱:[如何設置 CAOS](更多信息: 如何設置 CAOS)。

功能

在本地主機上托管 analytics.js 或 gtag.js(有什麼區別?)
下載的檔案會重新命名為隨機字符串,以避免被廣告封鎖器擋下
相容性模式允許您使用本地托管檔案與所有 Google Analytics 外掛一起使用,例如:

MonsterInsights(Pro 版),
ExactMetrics
Site Kit by Google,
WooCommerce Google Analytics Integration,
WooCommerce Google Analytics Pro,
Analytify,
還有許多!

與所有 Cookie Notice 外掛相容,例如:

Complianz,
CookieYes,
WP Cookie Notice,
Cookie Notice & Compliance,
Cookie Notice & Consent Banner,
還有許多!

Minimal Analytics 支持,
Google Analytics V4 支持(包括雙追蹤),
預連接至 google-analytics.com 以減少延遲並加快請求速度,
當訪客使用廣告封鎖器查看您的頁面時,向您的 Google Analytics 儀表板傳送事件,
捕獲外部連結,
增強連結歸因,
將追蹤代碼添加到標頭、頁腳或手動設置,
異步或默認(同步)加載跟踪片段,
將 analytics.js/gtag.js 檔案保存到 WordPress 內容(wp-content)目錄中的任何位置,以避免 WordPress 安全外掛(如 WordFence)檢測或緩存外掛(如 WP Super Cache)刪除它,
從 CDN 提供 analytics.js/gtag.js,
設定 Cookie 到期時間,
設定網站速度取樣率,
設定調整後的跳出率 (Adjusted Bounce Rate),

原文外掛簡介

CAOS can be downloaded for free without any paid subscription from the official WordPress repository.
CAOS (Complete Analytics Optimization Suite) for Google Analytics allows you to host gtag.js locally and keep it updated using WordPress’ built-in Cron-schedule. Fully automatic!
Not a big Google Analytics user and just curious about your pageviews? CAOS fully supports Minimal Analytics 4. An extremely lightweight alternative to Google Analytics’ default libraries (gtag.js). Minimal Analytics also helps you get rid of that annoying Unused JS notice in Google PageSpeed Insights!
Whenever you run an analysis of your website on Google Pagespeed Insights, Pingdom or GTMetrix, it’ll tell you to leverage browser cache when you’re using Google Analytics. Because Google has set the cache expiry time to 2 hours. This plugin will get you a higher score on Pagespeed and Pingdom and make your website load faster, because the user’s browser doesn’t have to make a roundtrip to download the file from Google’s external server.
Just install the plugin, enter your Mesurement ID and the plugin adds the necessary Tracking Code for Google Analytics 4 to the header (or footer) of your theme, downloads and saves the gtag.js-file to your website’s server and keeps it updated (automagically) using a scheduled script in wp_cron(). Or if you’d like to use the locally hosted file with another plugin, check Compatibility Mode under Advanced Settings, Either way, CAOS is a set and forget plugin.
For more information: [How to setup CAOS](For more information: How to setup CAOS.
Features

Host gtag.js for Google Analytics 4 locally,
Downloaded files are renamed to random strings to avoid ad blockers,
Minimal Analytics 4 support,
Compatibility Mode allows you to use the locally hosted file with all Google Analytics plugins, e.g.

MonsterInsights (Pro),
ExactMetrics
Site Kit by Google,
WooCommerce Google Analytics Integration,
WooCommerce Google Analytics Pro,
Analytify,
And many more!

Compatible with all Cookie Notice plugins, e.g.

Complianz,
CookieYes,
WP Cookie Notice,
Cookie Notice & Compliance,
Cookie Notice & Consent Banner,
And many more!

Preconnect to google-analytics.com to reduce latency and speed up requests,
Add tracking code to header, footer or manually,
Save gtag.js anywhere within the WordPress content (wp-content) directory to avoid detection by WordPress security plugins (such as WordFence) or removal by caching plugins (such as WP Super Cache),
Serve gtag.js from your CDN,
Set Cookie Expiry Period,
Force disabling display features functionalities,
Track logged in Administrators,

Features in CAOS Pro
Use Google Analytics in compliance with GDPR with:
– Randomize Client ID (which grants a fresh, untraceable UUID/ClientID to each visitor),
– Stealth Mode (a unique, customized API, designed for WordPress, which anonymizes your visitor’s data before sending it to Google’s servers).
Other features:
– Cloaked Affiliate Link Tracking,
– Cloudflare Compatibility Mode.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「CAOS | Host Google Analytics Locally」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.36 | 1.44 | 1.67 | 1.72 | 1.87 | 1.97 | 2.1.7 | 2.2.3 | 2.3.5 | 2.4.4 | 2.5.0 | 2.6.6 | 2.9.0 | 2.9.1 | 2.9.2 | 2.9.3 | 2.9.4 | 3.0.0 | 3.0.1 | 3.1.0 | 3.1.1 | 3.1.2 | 3.1.3 | 3.2.0 | 3.3.0 | 3.3.1 | 3.3.3 | 3.3.4 | 3.3.5 | 3.3.6 | 3.3.7 | 3.4.0 | 3.4.1 | 3.4.2 | 3.4.3 | 3.4.4 | 3.5.0 | 3.5.1 | 3.5.2 | 3.5.3 | 3.6.0 | 3.7.0 | 3.7.1 | 3.7.2 | 3.7.3 | 3.7.4 | 3.7.5 | 3.7.6 | 3.7.7 | 3.8.0 | 3.8.1 | 3.9.0 | 3.9.1 | 3.9.2 | 3.9.3 | 3.9.4 | 4.0.0 | 4.0.1 | 4.0.2 | 4.0.3 | 4.0.4 | 4.0.5 | 4.1.0 | 4.1.1 | 4.1.2 | 4.1.3 | 4.1.4 | 4.1.5 | 4.1.6 | 4.1.7 | 4.1.8 | 4.2.0 | 4.2.1 | 4.2.2 | 4.2.3 | 4.2.4 | 4.2.6 | 4.3.0 | 4.3.1 | 4.3.2 | 4.3.3 | 4.3.4 | 4.3.5 | 4.4.0 | 4.4.1 | 4.4.2 | 4.4.3 | 4.4.4 | 4.4.5 | 4.5.0 | 4.6.0 | 4.6.1 | 4.7.0 | 4.7.1 | 4.7.2 | 4.7.3 | 4.7.4 | 4.7.5 | 4.7.6 | 4.7.7 | 4.7.8 | 4.7.9 | 4.8.0 | 4.8.1 | 4.8.2 | 4.8.3 | 4.8.4 | 4.8.5 | 4.8.6 | 4.8.7 | trunk | 2.7.11 | 3.1.22 | 3.10.0 | 3.10.1 | 3.11.0 | 4.7.10 | 4.7.11 | 4.7.12 | 4.7.13 | 4.7.14 | 4.7.15 | 4.7.16 | 4.7.17 |

延伸相關外掛(你可能也想知道)

  • Web Vitals 》將Web Vitals傳送至Google Analytics。, 此外掛不會嵌入或包含GA/GTAG/GTM至您的網站,它使用現有的整合方式透過JavaScript Web Vitals腳本提交收集到的Googl...。
  • Easy Google Analytics Toolkit 》Easy Google Analytics Toolkit 利用 Universal Analytics 或 Global Site Tag 的最新和驚人功能,輕鬆地在您的部落格上添加追蹤代碼,讓您可以鍵入任何帶有...。
  • Analytics Event Tracking for GTAG 》這個外掛讓您輕鬆地從您的網站添加 Google Analytics 事件 GTAG 事件,以便追蹤來自網站的內部或外部連結。尤其適用於點擊跟踪或分析登陸頁面互動。, 您還可...。

文章
Filter
Apply Filters
Mastodon