“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.
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.
- Enter “Hide GTM code” in the plugin search field.
- Once you find this plugin, click “Install Now” to install and activate it.
There are no reviews for this plugin.
Contributors & Developers
“Hide GTM code” is open source software. The following people have contributed to this plugin.Contributors
Fixed an issue where a PHP warning due to insufficient data would be displayed if data was not migrated when moving the homepage.
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.
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.
Fixed code output priority again to output GTM noscript code before svg (priority set to ‘0’).
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.)
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.
Fixed code output precedence to output GTM noscript code before svg.
Changed the translation method.