0

I want to disable google tag manager on 404 templates, I am able to add the additional condition for the script "Google Tag Manager Settings" enter image description here

It has stopped GTM script code, but <noscript> tracking is still rendering on the page.

enter image description here

Is their way inside plugin options/SeoMatic template variable, soi can hide <noscript> code as well on specific pages

1 Answer 1

1

SEOmatic author here -- what version of SEOmatic are you using? I think the best way to do this would be to just disable the container from being included in your 404 Twig template:

{% do seomatic.script.get('googleTagManager').include(false) %}

As per: https://github.com/nystudio107/craft-seomatic#google-tag-manager

2
  • I am using 3.1.23, thank you for an answer, it's working well
    – Girish
    Commented Oct 29, 2018 at 15:56
  • Great! You can use that same technique for any containers or tags in SEOmatic Commented Oct 29, 2018 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.