[WordPress] 外掛分享: Metronet Tag Manager

WordPress 外掛 Metronet Tag Manager 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Metronet Tag Manager」是 2013-07-23 上架。
  • 目前有 30000 個安裝啟用數。
  • 上一次更新是 2023-09-02,距離現在已有 609 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.2 以上版本才可以安裝。
  • 有 8 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

ronalfy | ruskinconsulting |

外掛標籤

google | tag manager | google tag manager |

內容簡介

將 Google Tag Manager 整合到您的網站中。

Google Tag Manager(GTM)的好處是您能夠在一個地方收集大部分的追蹤腳本。然後,您可以按照您設置的規則隨時啟動這些腳本。聽起來不錯,對吧?實際上確實如此。唯一的問題是有時候需要一點實現來設置這些規則。實現可以是在載入標籤管理器腳本之前在資料層中設置資料層變數,或者在單擊按鈕時將帶有“事件”變數的 HTML 事件處理程序推送到資料層中。當您無法將代碼添加到您的網站上時,這就不那麼容易做到。

這就是 Metronet Tag Manager 外掛的優勢所在。它真正發揮了數據層的功能,因此您可以在幾乎任何元素上輕鬆設置宏和觸發規則。

此外,此外掛還可以讓您:

以每個文章和每個頁面為基礎輕鬆添加許多資料層變數。
外掛已經為您提供了六個預定義的數據層變數,您可以更改/刪除或使用這些變數測試系統。這些將載入到所有頁面和文章中。
為不是文章或頁面的頁面(例如檔案庫等)設置單獨的數據層變數。
使用 WYSIWYG 中的 GTM TinyMCE 按鈕輕鬆地為任何內容鏈接添加 HTML 事件處理程序。
使用 WYSIWYG 中的 GTM TinyMCE 按鈕輕鬆地為每個內容鏈接添加您自己的獨特 ID 或類別。

請注意,為使此外掛正常運作,需要進行輕微的自定義。 WordPress 不允許您在開始的 標籤後直接載入腳本,這是 GTM 腳本需要放置的地方。為了修正這個問題,您需要在 標籤之後添加 ,就這樣。

請注意,如果您使用的是 WordPress 5.2 或更新版本,請聯繫您的主題開發人員,要求他們在主題的開始標籤後插入 。這里是一些代碼,以顯示主題開發人員以使其與Metronet Tag Manager相容。

如果您對此外掛有任何功能請求或問題,請告訴我們。

以下是一些資源,如果您是 Google Tag Manager 的新手,您可能會發現有價值:

官方 Google Tag Manager 網站。
https://developers.google.com/tag-manager/

使用 Google Tag Manager 跟踪 Google Analytics 事件。
http://moz.com/ugc/tracking-google-analytics-events-with-google-tag-manager

使用標籤管理和數據層使分析更好。
http://cutroni.com/blog/2012/05/14/make-analytics-better-with-tag-management-and-a-data-layer/

篩選變數

如果您選擇將變數值放在百分比符號中(例如,%replace_test%),您可以根據需要進行篩選。

以下是一個示例:

add_filter ('gtm_replace_test', 'gtm_replace_test', 10, 3);
function gtm_replace_test( $total_match, $match, $post_id ) {
return "replaced with content";
}

篩選器名稱為 gtm_,後綴為 replace_test,因為那個內容處於百分比符號之間。

原文外掛簡介

Integrate Google Tag Manager into your website.
The great thing about Google Tag Manager (GTM) is that you are able to gather most of your tracking scripts in one place. You can then fire these scripts whenever you want, specified by the rules you set up. This sounds great, right? Well, it is. The only problem is that sometimes it takes some time to set these rules up. This implementation can either set a dataLayer variable in the dataLayer before the tag manager script is loaded or push an HTML event handler with the variable “event” to the dataLayer when a button is clicked. The problem is that this isn’t always that easy to do when you don’t have the ability/access to add the code to your site.
This is where the Metronet Tag Manager plugin shines. It unlocks the power of the dataLayer so you can easily set macros and firing rules on almost any element.
This plugin lets you:

Easily add as many dataLayer variables per-post and per-page basis as needed.
The plugin already gives you six predefined dataLayer variables you can change/remove or test the system with. These will be loaded on all pages and posts.
Set up separate dataLayer variables for pages that aren’t posts or pages (like archives, etc).
Lets you easily add an HTML event handler to any content link with the GTM TinyMCE button in the WYSIWYG.
Lets you add your unique ID or a class to each content link with the GTM TinyMCE button in the WYSIWYG.

Please note that for this plugin to work, a slight customization is needed. WordPress doesn’t let you load scripts straight after the opening tag, where the GTM script needs to be placed to work correctly. To fix this, you need to add just after the

tag, and that’s it.

Note, If you are using WordPress 5.2. and up, contact your theme developer and ask them to insert just after the opening body tag of their theme. Here is some code to show the theme developer to make it compatible with Metronet Tag Manager.

Please let us know if you have any feature requests or issues with this plugin.
Below are a couple of resources you might find valuable if you are new to Google Tag Manager
Official Google Tag Manager website
https://developers.google.com/tag-manager/
Tracking Google Analytics Events with Google Tag Manager
http://moz.com/ugc/tracking-google-analytics-events-with-google-tag-manager
Make Analytics Better with Tag Management and a Data Layer
http://cutroni.com/blog/2012/05/14/make-analytics-better-with-tag-management-and-a-data-layer/
Filtering Variables
If you choose to place variable values inside percentage signs (e.g., %replace_test%), you can filter these as necessary.
Here’s an example:
add_filter( 'gtm_replace_test', 'gtm_replace_test', 10, 3 );
function gtm_replace_test( $total_match, $match, $post_id ) {
return "replaced with content";
}

The filter name is gtm_ with the suffix of replace_test, since that content is inbetween the percentage signs.

各版本下載點

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

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


1.0.0 | 1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.0.5 | 1.0.6 | 1.0.8 | 1.1.0 | 1.2.0 | 1.2.1 | 1.2.3 | 1.2.5 | 1.2.7 | 1.2.9 | 1.3.0 | 1.3.1 | 1.5.0 | 1.5.1 | 1.5.2 | 1.5.3 | 1.5.4 | 1.5.5 | trunk |

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

  • GTM4WP – A Google Tag Manager (GTM) plugin for WordPress 》Google Tag Manager (GTM) 是 Google 免費工具,讓每個人都能使用直覺的網頁 UI 管理並部署分析和行銷標籤,以及其他程式碼片段。欲瞭解更多此工具信息,請前...。
  • PixelYourSite – Your smart PIXEL (TAG) & API Manager 》p>管理您的 Meta Pixel (Facebook Pixel),使用單一外掛實施 Facebook Conversion API、加入 Google Analytics 4 (GA4) 或舊版 Universal 特性。使用 Head 和...。
  • GTM Kit – Google Tag Manager & GA4 integration 》GTM Kit 是一個 WordPress 外掛,可以在您的網站上放置 Google Tag Manager 容器代碼,因此您不需要更改任何代碼。它還可以將 WooCommerce、Easy Digital Dow...。
  • Beehive: Google Analytics Dashboard & Visitor Stats 》s you restrict access to analytics information based on user role, ensuring that sensitive data is only viewed by those who need it., , 你正在尋找...。
  • Google Analytics and Google Tag Manager 》使用 WordPress 外掛輕鬆在網站上部署 Google Analytics,無需進行程式碼編輯,且避免追蹤自己的訪問。您可以排除任何已登入的使用者,僅針對其他訪客進行追...。
  • Event Tracking for Gravity Forms 》, Gravity Forms 推出了官方 Google Analytics 外掛,這是本外掛的後繼者。, , 透過 Google Analytics 和 Google Tag Manager,本外掛提供了一個簡單的方法來...。
  • WP Global Site Tag 》WP全局站點標記(gtag.js)是一個新的Google Analytics替代方案。WP全局站點標記提供了一個流程簡化網頁標記的框架-讓您更好地控制,同時使實現更簡單。使用g...。
  • GTM Server Side 》如果你正在尋找在 WordPress 網站上實現伺服器端追蹤的最簡單方法,stape.io 的 GTM Server Side 外掛是最好的解決方案。它可以輕鬆修改 gtm 指令碼,標記伺...。
  • Really Simple Google Tag Manager (GTM) 》Google Tag Manager是一個標籤管理系統,可以輕鬆更新網站上的行銷標籤片段/代碼/追蹤像素。它幫助管理網站標籤而不需要編輯主題的代碼。, 該管理員讓您能夠...。
  • Tag Pilot FREE – Google Tag Manager Integration for WooCommerce 》您擁有 WooCommerce 商店並想要追蹤和分析您的客戶活動嗎?, 此外掛可將標準的電子商務資訊推送至 GTM 數據層。, 當此資訊在您的 GTM 工作區可用時,您可以添...。
  • Simple Analytics – Tag Manager 》此外掛讓您能夠非常簡單地配置您的程式碼:Google Analytics 和 Google Tag Manager。, 功能, , 讓您配置 Google Analytics。, 讓您配置 Google Tag Manager...。
  • Consent Mode Banner 》,
      ,
    • GTMCookie同意模式橫幅是一個輕量(1.9 kB)、用戶友好的WordPress外掛程式,旨在無縫將Google Tag Manager Cookie同意...。
    • Tagging 》- AdPage Tagging 是一個簡單易用的解決方案,用於設置 Google Tag Manager 伺服器端。, - 標籤化的好處包括:, * 增加 Cookie 的生命周期(包括 Safari 16...。
    • Easy Google Tag Manager 》The Easy Google Tag Manager plugin adds a field to the existing General Settings page for the ID and displays the javascript in the front-end foote...。
    • PLX Lead Reporting 》此外掛可加速 Google Tag Manager 整合,提供不同樣式且可匯入的 GTM JSON,將 Tag Manager 腳本添加至 Header 和 Body 中,並為 Contact Form 7 整合設置 Ja...。

文章
Filter
Apply Filters
Mastodon