GA Pro makes it easy to enable or disable any tracking codes via the plugin settings. This tutorial explains how to disable all tracking codes programmatically, using a custom function. This is useful for developers looking to extend and customize default plugin functionality.

Thanks to a filter hook provided in GA Pro, it’s possible to disable all tracking codes by adding the following function to your WordPress site.

function ga_google_analytics_pro_disable_custom($enable, $options) { return true; }
add_filter('ga_google_analytics_pro_disable_custom', 'ga_google_analytics_pro_disable_custom', 10, 2);

No changes need made, simply add via theme functions or simple plugin. Once added, the above code will prevent GA Pro from adding any tracking codes to your site.