<p>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:</p>

<pre><code>{% do seomatic.script.get('googleTagManager').include(false) %}
</code></pre>

<p>As per: <a href="https://github.com/nystudio107/craft-seomatic#google-tag-manager" rel="nofollow noreferrer">https://github.com/nystudio107/craft-seomatic#google-tag-manager</a></p>

CC BY-SA 4.0
2018-10-29T15:56:39.270Z
I am using `3.1.23`, thank you for an answer, it's working well
Girish
CC BY-SA 4.0
2018-10-29T16:35:30.753Z
Great! You can use that same technique for any containers or tags in SEOmatic
andrew.welch
CC BY-SA 4.0
2018-10-29T15:41:55.117Z
2018-10-29T15:41:55.117Z
andrew.welch
<p>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"
<a href="https://i.sstatic.net/aDbUp.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aDbUp.png" alt="enter image description here"></a></p>

<p>It has stopped GTM script code, but <code>&lt;noscript&gt;</code> tracking is still rendering on the page.</p>

<p><a href="https://i.sstatic.net/9za06.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9za06.png" alt="enter image description here"></a></p>

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

<craft3><plugin-seomatic>
Craft SeoMatic GTM <noscript> disable on 404 pages
# Craft SeoMatic GTM <noscript> disable on 404 pages

(Asked by: username_0 on 2018-10-29)

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](https://i.sstatic.net/aDbUp.png)](https://i.sstatic.net/aDbUp.png)

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

[![enter image description here](https://i.sstatic.net/9za06.png)](https://i.sstatic.net/9za06.png)

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

**Tags:** craft3, plugin-seomatic

---

## 1 answers

### Answer by username_1 on 2018-10-29. Score: 1 | Accepted answer

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

> **Comments:**
> **username_0**: I am using `3.1.23`, thank you for an answer, it's working well  
> **username_1**: Great! You can use that same technique for any containers or tags in SEOmatic  

---

