Add filter to options
-
It’d be great if we had a filter on
ga_google_analytics_options()
so that we could filter the values based on something like the environment.For example, if I have an environment variable set, disable tracking:
add_filter('some_filter_name', function( $options ) { if(env('WP_ENV') != 'production') $options['gap_enable'] = false; return $options; });
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add filter to options’ is closed to new replies.