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.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.