Actions and Filter Hookes

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
define( 'GTMKIT_CONTAINER_ID', 'GTM-XXXXXXX' );


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


// Log debug messages to the browser console
define( 'GTMKIT_CONSOLE_LOG', false );


// Don't limit purchase tracking to only once per order
define( 'GTMKIT_WC_DEBUG_TRACK_PURCHASE', true );
define( 'GTMKIT_EDD_DEBUG_TRACK_PURCHASE', true );

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.


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.