GTM Container Quality issues
-
Hello!
Site Kit by Google plugin, unfortunately, fails to insert Google Tag Manager (GTM) snippet (including Google tag) into site (running on WP Engine with Genesis Infinity Pro theme) without issues.
On one hand, after installing and activating Site Kit as well as connecting Google services (including Tag Manger, Search Console, Analytics, Ads, and PageSpeed Insights), Site Kit and Tag Assistant (in both Chrome extension and GTM preview/connection) show that everything is fine (e.g., all tags are visible), as you can see from these screenshots.
On the other hand, the GTM container quality states URGENT issues (especially, “Tag not placed correctly: Your tag may be installed too low in the page, which can impact performance.”), as you can see from these screenshots.
In view of this, please advise how to fix those issues as soon as possible.
Thank you and look forward to hearing from you.
The page I need help with: [log in to see the link]
-
Thanks for getting in touch @dbiryuk. From the checks I performed on your site I can see that you have successfully placed both a Google Analytics snippet via Site Kit (G-GX****0FW) and also a Google Tag, althought I can’t confirm that this has been placed via Site Kit given there are optimizations performed on your site that remove comments and also result in non-standard Site Kit placed snippets, as per this guide.
I also checked your site using the tagassistant.google.com service, and from doing so I can see that your tags are firing as expected, despite any optimizations performed.
On the other hand, the GTM container quality states URGENT issues (especially, “Tag not placed correctly: Your tag may be installed too low in the page, which can impact performance.”), as you can see from these?screenshots.
This is a warning that may appear outside of Site Kit. I would suggest checking does the same occur if you temporarily deactivate any optimization plugin and ensure the standard code has been placed without modification. I would also suggesting using the tagassistant.google.com service, to ensure all tags are firing as expected from your site.
Let me know if you have any questions with the above. Thank you.
Hi @jamesosborne, thanks a lot for your response.
Following your suggestion, deactivation of optimization plugin (i.e., Autoptimize) changes nothing in how the Site Kit’s GTM code is placed. So, this plugin has no effect on code placement.
Notably, the Site Kit’s GTM script code appears to be standard, but its noscript code – non-standard (inside another code), as you can see from these screenshots of View Page Source.
Does this noscript code placement cause those GTM urgent issues?
Thanks!
Thanks for the update.
Following your suggestion, deactivation of optimization plugin (i.e., Autoptimize) changes nothing in how the Site Kit’s GTM code is placed. So, this plugin has no effect on code placement.
I can see comments on your site when inspecting your sites source code now, however, as you may already be aware, comments don’t impact standard tag functionality. From checking your site at present, I can see all tags are firing as they were previously, with all set up correctly.
Regarding the
noscript
snippet placed via Site Kit, you’ll see how this should appear here. I can’t see the full output from your screenshot, but from inspecting your source code I can confirm it’s valid, with a standard placement as per the link I directed to above. This is also how Tag Manager suggests placing the code (if not using Site Kit).So to confirm, I don’t see any unusual behavior, or anything wrong with your Analytics or Tag Manager snippet placement via Site Kit, nor do I see any issues with tracking visits. Let me know if you have any questions with the above. Thank you.
@jamesosborne thanks for your quick response.
Two (out of three) screenshots named “GTM Noscript Code” and “GTM Noscript Code+” showed the same GTM NOscript code (i.e., its beginning and continuation) inserted by Site Kit when Autoptimize plugin was deactivated.
In this respect, what did you mean by “you’ll see how this should appear?here“, while linking to the same screenshots above?After re-activation of Autoptimize plugin, the Site Kit comments are now apparently removed.
Anyway, if everything is fine, why does GTM show those urgent issues? If that’s a mistake, could you please fix/remove those issues in GTM?
Thanks for your support!
Thanks for the update @dbiryuk.
The GTM NOscript code I suspect will appear with or without Autoptimize?activated and optimizations performed. There may be settings whereby comments on your site, added via Site Kit or other plugins, are removed. Many optimization plugins can remove such comments to reduce the rendered page size.
In this respect, what did you mean by “you’ll see how this should appear here“, while linking to the same screenshots above?
Apologies, the link I should have directed you to can be found here, a page that lists the code that Site Kit placed on a users site, which can be inspected on your own site if you wish.
Anyway, if everything is fine, why does GTM show those urgent issues? If that’s a mistake, could you please fix/remove those issues in GTM?
With regards any “Tag not placed correctly” comments from Tag Manager, can you share where you’re finding such messages? If this within the Tag Manager platform, when using the legacy Chrome Tag Assistant extension or elsewhere? Site Kit places the code snippet on users sites as directed by Tag Manager, the same as if a user placed the code manually, following Tag Manager snippet placement guidance. I did check your site once more and the notice may be related to an optimization setting, as I can see various optimization related code at the header of your site. If you wish to troubleshoot this, please share where you encounter this message, and also share whether this message appears if you have all optimization plugins temporarily deactivated.
Let me know if you have any questions with the above. Note also that despite any warnings regarding “Tag not placed correctly”, it’s possible that this can be disregarded given the tags are firing.
@jamesosborne thanks for your clarification.
As requested, you can see that warning on urgent issues from these?screenshots (especially, 3-4 highlighted in red) of Tag Manager (GTM).
Those issues remain the same even when Autoptimize plugin is inactive.
As such, the GTM’s tag placement status (incorrect), unfortunately, contradicts to the Site Kit’s (correct).
So, could you please coordinate and fix this misalignment issue with your GTM colleagues.
Thanks!
Thanks for the update @dbiryuk, appreciate the additional details.
From reviewing your site, and the optimizations performed, I can see that there is various optimization relation code, maybe from some configurations at host level, or from any third party plugins. See what I highlighted here (also shared previously). As you’ll see in this official Tag Manager guide, the
<head>
code should be placed as high as possible on a users site. Site Kit already does this, however, in your case the script is placed much further down. It’s not just a case of being placed further down, but it’s a non-standard script, likely altered via some optimizations performed on your site.As such, the GTM’s tag placement status (incorrect), unfortunately, contradicts to the Site Kit’s (correct).
If you do wish to temporary undo any optimizations on your site, I’m happy to check your snippet placement once more, however, Site Kit does place the snippets and tags as suggested by Tag Manager. It’s common that optimizations via hosting features or plugins do alter the behavior of tags, so it always advisable to check with every such configuration applied, to ensure all is working as expected. This isn’t something we can address on the Site Kit side of third party plugins or hosting features are making alterations. Luckily, from the checks I did perform once again on your site, it seems the tags are firing regarding or the warning.
Let me know if you have any questions with the above. Thank you.
Hi @jamesosborne, thanks for your response.
As you suggested, all of the plugins (except for Site Kit) were deactivated and all caches cleared, as you can see from this screenshot. This, however, has not fixed those GTM urgent issues.
As such, the problem is apparently in either GTM or Site Kit plugin.
So, please check and fix this problem in order to re-activate all plugins as soon as possible.
Thank you and look forward to hearing from you.
@dbiryuk Thanks for the follow up. As explained by James previously, this is the result of optimization code you had placed on your site by third party plugins you had active at the time. Because of this, there is little we can do when this code is placed and we are unable to alter or move any such code placed by third party plugins.
I can now see after you have disabled all other plugins on your site that the GTM code placed by Site Kit is placed where I’d expect to see it and a check of your site in the Google Tag Assistant shows your GTM container being fired.
I would suggest reaching out to the optimization plugin team to see if there is anyway you can adjust the optimization code placement or any exceptions you can put in place so that this doesn’t affect the Tag Manager code placement by Site Kit.
As explained above, we are unable to control third party placed code so you could either disable the conflicting plugin or reach out to the plugin support to see if they can assist you further with this.
But just to confirm that checking your site now looks good from a Site Kit and Tag Manager perspective. I hope this helps but please let me know if we can help any further on the Site Kit side of things.
Hi @adamdunnage, thanks for your quick response.
Since ALL of the plugins (apart from Site Kit) have been DEACTIVATED/DISABLED (as you can see from the?screenshot provided), NO optimization code of any of those plugins is placed on the site now.
In view of that, why does GTM still indicate those URGENT ISSUES (while you say that “site now looks good from a Site Kit and Tag Manager perspective”)?
-
This reply was modified 1 month, 1 week ago by
;D.
@dbiryuk That’s interesting that you’re still seeing these warnings on the Tag Manager platform. Do you still see the same if you Submit > Publish your Tag Manager container once more? You can do this without making any changes to your container. Let me know if you still see the warnings after doing this.
@adamdunnage thanks for your note.
As you requested, I’ve just submitted and published a new version of the same GTM container. This, however, has not fixed those?GTM urgent issues warnings. They still remain the same.
As you can see, it’s obviously something wrong with GTM and/or Site Kit. So, please check and fix this error asap.
Thanks!
@dbiryuk Checking your site source code once more I can now see the optimization code again at the top. This looks like it is coming from the LiteSpeed plugin. I can also no longer see the expected Site Kit placed code. So this will likely be why you’re still seeing these messages in the Tag Manager platform. Have you activated all your plugins once more can I ask?
If you have activated your optimization plugins again it makes it difficult for us to troubleshoot this further. But I can confirm that when you did disable them yesterday that I could see your GTM tag firing and the code placed as expected by Site Kit in your source code.
Hi @adamdunnage, thanks for your response.
You’re right, the source code is back because all plugins have been re-activated.
You can see the code when all plugins (expect for Site Kit) were deactivated from these screenshots.
If your troubleshooting necessitates to deactivate all those plugins again, please let me know.
Also, there’s no LiteSpeed plugin at all. There’s WP YouTube Lyte, but it’s inactive.
Thanks!
@dbiryuk Thanks for the response. Can I ask if at any point you paused your GTM tag from the Tag Manager platform? We are looking into another similar report to yours in which the user paused their GTM tag from the Tag Manager platform. This may be unrelated but it would be useful to know if you had performed this at any stage.
-
This reply was modified 1 month, 1 week ago by
- You must be logged in to reply to this topic.