Tag Scout

外掛說明

Tracking scripts can hide in many places — plugins, themes, and custom code.
Tag Scout shows you exactly where each tracking code originates.

It scans any URL on your site and detects:

Google Analytics 4 (GA4)
Universal Analytics (legacy)
Google Tag Manager (GTM)
Meta Pixel
Hotjar
Microsoft Clarity

Tag Scout searches your WordPress installation for matching fragments in:

  • wp_options (option values)
  • wp_posts (post content across all post types, including Code Snippets CPT)
  • wp_postmeta (meta values: page builders, ACF, etc.)
  • Legacy Code Snippets table ({prefix}snippets), if present
  • Key theme files: header.php, footer.php, functions.php in parent and child themes

Results are shown as clean cards with:

Provider name (GA4, UA, GTM, etc.)
ID (Measurement ID, UA property, GTM container, etc.)
Snippet preview
“Found in…” list (options, posts, postmeta, Code Snippets, theme files)

Tag Scout is read-only. It never changes your database or files — it just helps you find where to fix things.

Tag Scout does not connect to any third-party APIs or services. It only requests your own site’s URL using wp_remote_get() and scans that HTML for known tracking patterns.

螢幕擷圖

安裝方式

  1. Upload the tag-scout folder to /wp-content/plugins/ or install via Plugins Add New.
  2. Activate the plugin.
  3. Go to Tools Tag Scout.
  4. Enter a URL from your site and click Scan URL.

常見問題集

Does Tag Scout change anything on my site?

No. It is completely read-only. It only reads database values and theme files to show matches.

Will it find tracking code inside themes and plugins?

If the code is stored in options, posts, postmeta, Code Snippets, or in header.php, footer.php, or functions.php of the active theme (child or parent), Tag Scout can report it as a possible source.

Why does it sometimes say “No matching locations were found”?

That means the script is visible in the front-end HTML, but the exact fragment wasn’t found in the places Tag Scout searches. It may be injected dynamically at runtime by a plugin or only load under certain conditions.

Does it detect disabled Code Snippets?

Yes. Disabled snippets still exist in the database, so they can show up as locations even if they’re not currently running.

使用者評論

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

參與者及開發者

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

參與者

將〈Tag Scout〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.1

  • Improved tracking source detection for Code Snippets, including clearer active/inactive status.
  • Restored theme file scanning for header.php, footer.php, and functions.php in parent/child themes.

1.0.0

  • Initial public release.

1.0.0

  • First public release.
  • Detection for GA4, UA, GTM, Meta Pixel, Hotjar, Clarity.
  • Grouped implementations with IDs and snippet previews.
  • Source finder for options, posts, postmeta, Code Snippets CPT + legacy table.
  • Theme file checks for header.php, footer.php, functions.php.
  • Read-only scan UI under Tools Tag Scout.