Title: Container Code Off but still injecting Code
Last modified: December 5, 2023

---

# Container Code Off but still injecting Code

 *  [idhamsy](https://wordpress.org/support/users/idhamsy/)
 * (@idhamsy)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/container-code-off-but-still-injecting-code/)
 * Hi,
 * I am using the latest version of the plugins. I turned off the container code
   since I am already using Sitekit for code insertion. When I checked my front 
   end, I noticed that there were two GTM codes on my website. After disabling GTM4WP,
   the duplicate was removed. Is this a known bug?
 * Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [idhamsy](https://wordpress.org/support/users/idhamsy/)
 * (@idhamsy)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/container-code-off-but-still-injecting-code/#post-17254101)
 * I just found the issue. The issue come because of this setting **Do not use console.
   log() messages on frontend**, ** **
   When i checked this, the GTM container is
   loaded with OFF setting.
 *  [Scott](https://wordpress.org/support/users/kitgrow/)
 * (@kitgrow)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/container-code-off-but-still-injecting-code/#post-17269502)
 * Also experiencing this. It has to do with the variable $output_container_code
   on line 1102 in frontend.php remaining true. The below change temporarily resolves
   the issue and can likely involve a few other changes to the following IF statements.
 *     ```wp-block-code
           $output_container_code = GTM4WP_PLACEMENT_OFF === $gtm4wp_options[ GTM4WP_OPTION_GTM_PLACEMENT ] ? false : true;
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Container Code Off but still injecting Code’ is closed to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Scott](https://wordpress.org/support/users/kitgrow/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/container-code-off-but-still-injecting-code/#post-17269502)
 * Status: not resolved