Title: DevBrothers Counter Manager
Author: DevBrothers
Published: <strong>2026 年 6 月 14 日</strong>
Last modified: 2026 年 6 月 23 日

---

搜尋外掛

![](https://ps.w.org/devbrothers-counter-manager/assets/banner-772x250.png?rev=3571883)

![](https://ps.w.org/devbrothers-counter-manager/assets/icon-256x256.png?rev=3571883)

# DevBrothers Counter Manager

 由 [DevBrothers](https://profiles.wordpress.org/lzolotarev/) 開發

[下載](https://downloads.wordpress.org/plugin/devbrothers-counter-manager.1.0.5.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/devbrothers-counter-manager/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/devbrothers-counter-manager/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/devbrothers-counter-manager/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/devbrothers-counter-manager/#developers)

 [技術支援](https://wordpress.org/support/plugin/devbrothers-counter-manager/)

## 外掛說明

**DevBrothers Counter Manager** lets you add and manage web analytics counters on
your WordPress site without editing theme files. Paste the official counter code
from Yandex.Metrika or Google Analytics, enable or disable each counter, and optionally
show a cookie consent banner before scripts load.

#### Key Features

 * **Yandex.Metrika** — paste and manage your Metrika counter code
 * **Google Analytics** — paste and manage your gtag.js / GA code
 * **Enable / disable** — turn counters on or off without deleting saved code
 * **Insert into `<head>`** — active counter code is output in the document head
 * **Cookie consent banner** — optional banner; analytics loads only after visitor
   accepts (when enabled)
 * **Exclude paths** — skip the banner on selected URLs (e.g. dashboard pages)
 * **DevBrothers Admin Panel** — settings inside the unified DevBrothers interface

#### Cookie Consent (optional)

When the cookie banner is enabled:

 * Analytics scripts are **not** loaded until the visitor clicks Accept
 * A consent value is stored in a **first-party cookie** on your domain (`dbcm_cookie_consent`)
 * No consent data is sent to third parties — only stored locally in the visitor’s
   browser
 * You can link to your privacy / cookie policy page
 * Light or dark banner theme

When the banner is disabled, counters behave as usual and load immediately.

#### Requirements

 * WordPress 5.8+
 * PHP 7.4+
 * [DevBrothers Admin Panel](https://wordpress.org/plugins/devbrothers-admin-panel/)(
   required dependency)

### External services

This plugin integrates with third-party analytics services when you enable counters
and paste their official tracking code.

#### Yandex.Metrika

When enabled, the plugin outputs the Yandex.Metrika counter code you provide. Data
is sent to Yandex servers according to your Metrika configuration.

Typical data sent to Yandex.Metrika includes page views, browser/device information,
and referrer data (see Yandex documentation for details).

 * Service provider: Yandex LLC
 * Terms: https://yandex.com/legal/metrica_termsofuse/
 * Privacy: https://yandex.com/legal/privacy/

#### Google Analytics

When enabled, the plugin outputs the Google Analytics (gtag.js) code you provide.
Data is sent to Google servers according to your Analytics configuration.

Typical data sent to Google Analytics includes page views, browser/device information,
and referrer data (see Google documentation for details).

 * Service provider: Google LLC
 * Terms: https://www.google.com/analytics/terms/
 * Privacy: https://policies.google.com/privacy

#### Local cookie (consent banner)

When the cookie banner is enabled, the plugin stores the visitor’s choice (`accepted`
or `declined`) in a first-party cookie on your site. This data is **not** transmitted
to DevBrothers or any external service.

## 螢幕擷圖

[⌊Counter settings (Yandex.Metrika and Google Analytics)⌉⌊Counter settings (Yandex.
Metrika and Google Analytics)⌉[

Counter settings (Yandex.Metrika and Google Analytics)

[⌊Cookie consent banner settings⌉⌊Cookie consent banner settings⌉[

Cookie consent banner settings

[⌊Cookie banner on the front end (example)⌉⌊Cookie banner on the front end (example
)⌉[

Cookie banner on the front end (example)

## 安裝方式

 1. Install and activate **DevBrothers Admin Panel** from WordPress.org (or install
    it when prompted).
 2. Install and activate **DevBrothers Counter Manager**.
 3. Go to **DevBrothers  Counter Manager**.
 4. Enable a counter, paste the full code from your analytics account, and save.
 5. Optionally enable the cookie consent banner under the **Cookie banner** section.

## 常見問題集

### Can I use Yandex.Metrika and Google Analytics at the same time?

Yes. You can enable both counters simultaneously.

### Do I need to edit theme files?

No. All settings are managed in **DevBrothers  Counter Manager**.

### What happens when I disable a counter?

The code is saved in settings but not output on the front end until you enable it
again.

### How does the cookie banner work?

If enabled, analytics scripts load only after the visitor accepts. Until then, no
Metrika or GA code is printed in `<head>`. The choice is remembered via a local 
cookie.

### Can I hide the banner on certain pages?

Yes. Use **Exclude paths** in cookie banner settings (one path per line, e.g. `/
dashboard/`).

### Is it safe to paste counter code in the admin?

Only users with `manage_options` can save settings. The plugin blocks dangerous 
HTML tags in counter code while allowing standard `<script>` and `<noscript>` tags
used by analytics vendors.

### Why is DevBrothers Admin Panel required?

Counter Manager registers its settings page inside the DevBrothers admin UI. Install
Admin Panel from WordPress.org first.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈DevBrothers Counter Manager〉的開發相關工作。

參與者

 *   [ DevBrothers ](https://profiles.wordpress.org/lzolotarev/)

[將〈DevBrothers Counter Manager〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/devbrothers-counter-manager)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/devbrothers-counter-manager/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/devbrothers-counter-manager/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/devbrothers-counter-manager/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/devbrothers-counter-manager/)。

## 變更記錄

#### 1.0.5

 * Cookie banner text dynamically mentions only enabled counters (Yandex.Metrika,
   Google Analytics, or both)

#### 1.0.2

 * Cookie consent mode toggle: opt-in (default) or opt-out
 * Opt-out loads counters until visitor declines; opt-in loads only after accept

#### 1.0.1

 * Fix Plugin URI and Google Analytics Terms URL for WordPress.org review
 * Output counter scripts via wp_print_inline_script_tag (attributes escaped, JS
   intact)
 * Escape noscript fallback markup via wp_kses
 * Strengthen counter code validation on save

#### 1.0.0

 * Initial release
 * Yandex.Metrika and Google Analytics support
 * Optional cookie consent banner with path exclusions
 * Integration with DevBrothers Admin Panel

## 中繼資料

 *  版本 **1.0.5**
 *  最後更新 **2 週前**
 *  啟用安裝數 **40+**
 *  WordPress 版本需求 ** 5.8 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.0**
 *  PHP 版本需求 ** 7.4 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/devbrothers-counter-manager/)
 * 標籤:
 * [analytics](https://tw.wordpress.org/plugins/tags/analytics/)[cookie](https://tw.wordpress.org/plugins/tags/cookie/)
   [google analytics](https://tw.wordpress.org/plugins/tags/google-analytics/)[tracking](https://tw.wordpress.org/plugins/tags/tracking/)
   [yandex metrika](https://tw.wordpress.org/plugins/tags/yandex-metrika/)
 *  [進階檢視](https://tw.wordpress.org/plugins/devbrothers-counter-manager/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/devbrothers-counter-manager/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/devbrothers-counter-manager/reviews/)

## 參與者

 *   [ DevBrothers ](https://profiles.wordpress.org/lzolotarev/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/devbrothers-counter-manager/)