Hide GTM code

外掛說明

“Hide GTM code” is a very simple plugin for SEO.
It prevents the output of the GTM code when logging in, so it is also recommended for those who do not want to measure their own access or who want to prevent erroneous operations.

  • Embed GTM tags without customizing the theme yourself.
  • Since the insertion position is taken into consideration, it is possible to prevent the page display speed from decreasing due to inserting the GTM tag with the SEO plug-in.
  • Prevent GTM code from being output when logging in.

Arbitrary section

There are a few caveats.

This plugin uses functions to embed GTM code or GSC HTML tags, so it cannot be used in themes that do not call functions.

After embedding the GTM code in your website, if you want to register your GA4 with GTM and also register GSC, please select GTM in “How to verify ownership of GSC”. Attempting to verify ownership in GA4 fails with an error.

Depending on the theme, some tags (such as the “a” tag) are embedded directly under the body tag as theme-specific elements. In that case, unfortunately if you select GTM in “How to verify ownership of GSC”, it will fail, so please set it to “HTML tag”. To set the HTML tag on the website, please set it from “GSC setting”.

Be sure to clear the cache after setting.

螢幕擷圖

  • "Dashboard" screen
  • "Settings" screen
  • "GSC Settings" screen"

安裝方式

  1. Enter “Hide GTM code” in the plugin search field.
  2. Once you find this plugin, click “Install Now” to install and activate it.

常見問題集

The code to fill in is only the tag that starts with “GTM”. No JavaScript code required.

使用者評論

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

參與者及開發者

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

參與者

〈Hide GTM code〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Hide GTM code〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

1.0.6
Fixed an issue where a PHP warning due to insufficient data would be displayed if data was not migrated when moving the homepage.

1.0.5
Some themes embed HTML tags directly under the body tag as theme-specific elements, so selecting GTM in How to verify ownership of GSC fails. Added “HTML code setting screen” to solve this problem.

1.0.4
Since the specification to embed svg immediately after the body element added from WordPress 5.9 is prioritized, GTM’s noscript was not detected, and GSC’s ownership verification using GTM failed again. Fixed again.
Fix details:
Fixed code output priority again to output GTM noscript code before svg (priority set to ‘0’).

1.0.3
Fixed a bug that the value was not displayed on the screen when registering the input for the first time. (Because it was saved as data, it was displayed when you accessed it again. Please be assured that the data has not disappeared.)

1.0.2
Fixed a bug that GSC’s ownership verification using GTM failed due to GTM’s noscript not being judged due to the specification to embed svg immediately after the body element added from WordPress 5.9.
Fix details:
Fixed code output precedence to output GTM noscript code before svg.

1.0.1
Changed the translation method.

1.0.0
released.