We'll create fresh WordPress site with Hide GTM code installed. You have 20 minutes to test the plugin after that site we'll be deleted.
“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.
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.