diff --git a/readme.txt b/readme.txt index a4d2731..f1b4c84 100644 --- a/readme.txt +++ b/readme.txt @@ -97,6 +97,7 @@ Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1 #### Enhancements: * Added option to specify the Google Tag Manager environment. * Performance optimization through optimized database queries and general code improvements. +* Added a filter to deactivate the container, so the container can be deactivated on specific pages. #### Bugfixes: * Add missing _sbp cookie in the cookie keeper. diff --git a/src/Frontend/Frontend.php b/src/Frontend/Frontend.php index 6e16561..a99b672 100644 --- a/src/Frontend/Frontend.php +++ b/src/Frontend/Frontend.php @@ -45,7 +45,7 @@ public function __construct( Options $options ) { */ public static function register( Options $options ): void { $page = new Frontend( $options ); - $container_active = $options->get( 'general', 'container_active' ); + $container_active = ( $options->get( 'general', 'container_active' ) && apply_filters( 'gtmkit_container_active', true ) ); $noscript_implementation = $options->get( 'general', 'noscript_implementation' ); if ( empty( $options->get( 'general', 'just_the_container' ) ) ) {