
內容目錄
- 1 內容簡介
- 2 外掛標籤
- 3 開發者團隊
- 4 原文外掛簡介
- 5 , , , …) so the HTML5 parser doesn’t auto-close the and orphan the data attribute. Force explicitly by passing block="true". 3. Auto-track options Tick any of these in the Custom Event Tracking section of the settings: Track outbound link clicks — fires Outbound Link events with {url} properties on any anchor whose host differs from the current site (apex/www. pairs match as same-site). Both left-click and middle-click (open-in-new-tab) are caught. Track file downloads — fires Download events with {url} properties on anchors whose URL pathname ends in one of the listed extensions (PDF, ZIP, DOC/X, XLS/X, MP3/4, etc. by default — paste your own comma-, space-, semicolon-, or pipe-separated list to override). Track 404 pages — fires a 404 event with {path} properties when WordPress serves a not-found response. Programmatic JS API The dispatcher also exposes a global for inline scripts, custom builds, or third-party integrations: window.indieAnalytics.track( 'event-name', { /* optional properties */ } ); Provider notes Plausible requires the script variant that exposes the plausible() function for custom events (https://plausible.io/js/script.tagged-events.js, script.manual.js, etc.). The default plausible.js URL does not — change the Tracking Script URL in the provider card if you want custom events. Tinylytics and Counter.dev do not expose a custom-event JS API; their adapters are no-ops, so events fire normally for every other enabled provider while pageview tracking on those two keeps working. License This plugin is licensed under the GPL v2 or later. Credits Indie Analytics was created to help website owners easily implement privacy-focused analytics tools as alternatives to Google Analytics. 延伸相關外掛
內容簡介
**總結:** Indie Analytics 幫助您輕鬆將注重隱私的獨立分析工具整合到您的WordPress網站中。支援的分析提供者包括Umami、Plausible、Swetrix、Matomo和Fathom等。
**問題與答案:**
1. 如何進行配置?
- 從下拉菜單中選擇您的分析提供者。
- 輸入您的Site ID / Tracking ID。
- 輸入Tracking Script URL(大多數提供者都提供默認值)。
- 如果您使用自訂域名作為分析提供者,可以選擇性輸入該域名。
- 選擇是否排除管理員的訪問紀錄。
- 儲存您的設定。
2. 如何設置Umami?
- 在Umami上建立帳戶或設置自己的主機實例。
- 在Umami儀表板上創建一個網站。
- 從Umami儀表板中複製網站ID和Tracking Script URL。
- 將這些數值粘貼到外掛設置中的相應字段中。
3. 如何設置Plausible?
- 在Plausible上建立帳戶。
- 在Plausible儀表板中添加您的網站域名。
- 您的Site ID是您的域名(例如,example.com)。
- Tracking Script URL為https://plausible.io/js/plausible.js。
- 如果您使用自訂域名,請在自訂域名字段中輸入。
4. 如何獲取Matomo的安裝指示?
- 在您的服務器上設置Matomo或在Matomo Cloud上創建帳戶。
- 在Matomo中創建一個新的網站。
- 從追蹤代碼中複製Site ID。
- Tracking Script URL為您的matomo.js文件路徑(例如,https://example.org/matomo/matomo.js)。
5. Fathom的自訂域名設置如何?
- 在Fathom上建立帳戶。
- 在Fathom儀表板中添加您的網站。
- 從追蹤代碼片段中複製Site ID。
- Tracking Script URL為https://cdn.usefathom.com/script.js。
- 如果您使用自訂域名,請在自訂域名字段中輸入。
外掛標籤
開發者團隊
原文外掛簡介
Indie Analytics helps you easily integrate privacy-focused, independent analytics tools into your WordPress site.
Supported Analytics Providers:
Umami – Privacy-focused, cookie-free alternative to Google Analytics
Plausible – Simple, privacy-friendly Google Analytics alternative
Swetrix – Privacy-focused web analytics service
Matomo – Open-source analytics platform
Fathom – Simple analytics for bloggers & businesses
Simple Analytics – Privacy-first analytics, no cookies, GDPR/CCPA compliant
GoatCounter – Open source, privacy-friendly web analytics (free hosted or self-hosted)
Pirsch – Privacy-friendly, cookie-free analytics from Germany (GDPR compliant)
Cabin – Privacy-first, carbon-aware web analytics (no cookies, auto-detects domain)
Tinylytics – Minimal, privacy-focused analytics with hits, kudos, and uptime monitoring
Counter.dev – Simple, open-source, privacy-friendly web analytics (free, donation-supported)
Features
Easy integration with multiple indie analytics providers
Enable more than one provider at the same time — each runs independently with its own credentials
Simple admin interface for configuration
Detailed setup instructions for each provider
Exclude any combination of WordPress user roles (administrators, editors, authors, custom roles, etc.) from tracking
Exclude individual posts/pages from tracking with a one-click meta-box checkbox
Exclude URL paths (with * wildcards) globally, e.g. for staging areas or legal pages
Fire custom events to every enabled provider with a single PHP helper or shortcode
Auto-track outbound link clicks, file downloads, and 404 pages (opt-in per option)
Support for custom domains
Fast and lightweight
Configuration
Tick the box on any provider card to enable it (you can enable more than one — each runs independently)
For each enabled provider:
Enter your Site ID / Tracking ID (or leave blank for providers that auto-detect the domain)
Enter the Tracking Script URL (a default is pre-filled for most providers)
Optionally, enter a custom domain if you proxy or self-host the script
Tick any user roles you want to exclude from tracking (administrators, editors, authors, contributors, subscribers, or any custom role)
Optionally, enter URL path patterns (one per line) to exclude entire sections of the site — * is a wildcard, e.g. /staging/* or /privacy-policy
Save your settings
To exclude a specific post or page, open it in the editor and tick “Exclude this entry from analytics tracking” in the Analytics Tracking meta box
Provider Setup Instructions
Umami
Create an account on Umami or set up your self-hosted instance
Create a website in your Umami dashboard
Copy the Website ID and Tracking Script URL from your Umami dashboard
Paste these values into the corresponding fields in the plugin settings
Plausible
Create an account on Plausible
Add your website domain in the Plausible dashboard
Your Site ID is your domain name (e.g., example.com)
The Tracking Script URL is https://plausible.io/js/plausible.js
If you use a custom domain for Plausible, enter it in the Custom Domain field
Swetrix
Create an account on Swetrix
Create a new project in the Swetrix dashboard
Copy the Project ID from the installation instructions
The Tracking Script URL is https://swetrix.org/swetrix.js
Matomo
Set up Matomo on your server or create an account on Matomo Cloud
Create a new website in Matomo
Copy the Site ID from the tracking code
The Tracking Script URL is the path to your matomo.js file (e.g., https://example.org/matomo/matomo.js)
Fathom
Create an account on Fathom
Add your website in the Fathom dashboard
Copy the Site ID from the tracking code snippet
The Tracking Script URL is https://cdn.usefathom.com/script.js
If you use a custom domain for Fathom, enter it in the Custom Domain field
Simple Analytics
Create an account on Simple Analytics
Add your website in the Simple Analytics dashboard
Leave the Site ID field blank (Simple Analytics auto-detects your domain), or set it to override the auto-detected hostname (useful for staging/proxied installs)
The Tracking Script URL is https://scripts.simpleanalyticscdn.com/latest.js
If you use a custom domain for Simple Analytics, enter the full script URL in the Custom Domain field
GoatCounter
Create a free account on GoatCounter or set up a self-hosted instance
Your Site ID is your GoatCounter subdomain code (e.g., mysite for mysite.goatcounter.com). For self-hosted installs, enter the full https:// counting endpoint URL (e.g., https://stats.example.com/count) instead
The Tracking Script URL is https://gc.zgo.at/count.js
If you self-host the count.js script, enter the full URL in the Custom Domain field; it will override the Tracking Script URL
Pirsch
Create an account on Pirsch
Add your website domain in the Pirsch dashboard
Copy the Identification Code from the website settings — this is your Site ID
The Tracking Script URL is https://api.pirsch.io/pa.js (swap in https://api.pirsch.io/pa-sd.js to enable session-duration tracking)
Cabin
Create an account on Cabin
Add your website in the Cabin dashboard
Cabin auto-detects your domain — leave the Site ID field blank
The Tracking Script URL is https://scripts.withcabin.com/hello.js
If you proxy Cabin via a custom subdomain, enter the full script URL in the Custom Domain field; it will override the Tracking Script URL
Tinylytics
Create an account on Tinylytics
Add your website in the Tinylytics dashboard to generate a unique Site Code
Copy the Site Code from your embed snippet (the part between /embed/ and .js in the URL) — this is your Site ID
The Tracking Script URL is https://tinylytics.app/embed/ (your Site Code is appended automatically). To proxy Tinylytics, paste the full script URL (ending in .js) into the Custom Domain field and it will be used as-is.
Counter.dev
Create a free account on Counter.dev
Your Site ID is the value used for data-id in the embed snippet (your Counter.dev username/identifier)
The Tracking Script URL is https://cdn.counter.dev/script.js
Set the UTC Offset: leave at 0 for UTC (the default Counter.dev snippet behavior), enter a custom value in hours (e.g. -5 for EST, 5.5 for IST), or choose “Detect from visitor’s browser” to insert a tiny inline script that reads each visitor’s offset at load time
If you proxy Counter.dev via a custom URL, enter the full script URL in the Custom Domain field; it will override the Tracking Script URL
Custom Event Tracking
The plugin can fire custom events to every enabled provider without you having to know each provider’s JavaScript API. There are three ways to trigger an event:
1. PHP helper (template tag)
Call from a theme template or another plugin to fire an event on page load:
The helper emits a hidden that the front-end dispatcher scans on init and fires through every enabled provider’s adapter. It works from anywhere — header.php, the_content, sidebars, footer — and is safe under strict Content-Security-Policy (script-src 'self') because it never adds an inline
