Settings, actions and filters for developers

Override settings in wp-config.php

One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php.

This means that you can download a database from you production enviromnemt to you local dev environment without having to worry about changing the container ID or deactivating the container.

You can perform any test you need without poluting the data sent to the production GTM container.

The supported constants are listed below:

// True activates constants support and false turns it off
define( 'GTMKIT_ON', true );

// The GTM container ID

// Or true, in which case the constant is ignored
define( 'GTMKIT_CONTAINER_ACTIVE', false );

In order to use the constants you must first activate constants support with: define( 'GTMKIT_ON', true );

This i necessary to maintain high performance in a prodiction environment where you don’t need all theese extra config lookups and it is alsp an easy way to deactivate all custom values.