Title: Exclude Google Tag iframe
Last modified: May 2, 2026

---

# Exclude Google Tag iframe

 *  Resolved [ete](https://wordpress.org/support/users/ete/)
 * (@ete)
 * [1 month ago](https://wordpress.org/support/topic/exclude-google-tag-iframe/)
 * Hi there, is it any way to exclude the iframe from Google Tag Manager from the
   overall iframe block rule, so it does not get blocked but without having to fully
   turn off the iframe block rule for any other iframe?
   Thanks

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

 *  Plugin Support [hjogiupdraftplus](https://wordpress.org/support/users/hjogiupdraftplus/)
 * (@hjogiupdraftplus)
 * [1 month ago](https://wordpress.org/support/topic/exclude-google-tag-iframe/#post-18897370)
 * Hi [@ete](https://wordpress.org/support/users/ete/),
 * It appears that **File Security → Frames → Enable iFrame Protection** is enabled.
   Could this be causing the issue? At present, it is not possible to disable this
   setting for specific services such as Google Tag Manager.
 * Could you please clarify the exact issue you are experiencing? Does Google Tag
   Manager need to be displayed within an iframe on your site?
 * Regards
 *  Thread Starter [ete](https://wordpress.org/support/users/ete/)
 * (@ete)
 * [1 month ago](https://wordpress.org/support/topic/exclude-google-tag-iframe/#post-18897449)
 * Hi,
   Yes, exactly. iFrame protection is turned on and I would like to keep it 
   globally turned on but adding the Google Tag Manager iframe as an exclusion to
   the protection rule.
 * Google Tag Manager deployment setup incorporates 2 layers, the 2nd layer is an
   iframe that is added after the opening <body> that goes like this: 
   <!– Google
   Tag Manager (noscript) –><noscript><iframe src=”[https://www.googletagmanager.com/ns.html?id=GTM-XXXXX69&#8243](https://www.googletagmanager.com/ns.html?id=GTM-XXXXX69&#8243);
   height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript
   ><!– End Google Tag Manager (noscript) –>
 *  Plugin Support [hjogiupdraftplus](https://wordpress.org/support/users/hjogiupdraftplus/)
 * (@hjogiupdraftplus)
 * [1 month ago](https://wordpress.org/support/topic/exclude-google-tag-iframe/#post-18897861)
 * Hi [@ete](https://wordpress.org/support/users/ete/)
 * AIOS iFrame protection applies only to your site’s content. It prevents other
   websites from displaying your site within an iframe.
 * The Google Tag Manager code loads content from googletagmanager.com and should
   not be affected by the AIOS setting. It should work as expected, but please let
   me know if you encounter any issues.
 * Regards
 *  Thread Starter [ete](https://wordpress.org/support/users/ete/)
 * (@ete)
 * [1 month ago](https://wordpress.org/support/topic/exclude-google-tag-iframe/#post-18898306)
 * Thank you for the clarification about the iframe protection.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fexclude-google-tag-iframe%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/all-in-one-wp-security-and-firewall/assets/icon-256x256.
   png?rev=2798307)
 * [All-In-One Security (AIOS) – Security and Firewall](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [ete](https://wordpress.org/support/users/ete/)
 * Last activity: [1 month ago](https://wordpress.org/support/topic/exclude-google-tag-iframe/#post-18898306)
 * Status: resolved