• Resolved eclev91

    (@eclev91)


    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;
    });
    • This topic was modified 4 years, 10 months ago by eclev91.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Yeah that is a good idea. Will add to the next plugin update. Thanks @eclev91 for the feedback.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up with this, the upcoming version of the plugin includes the requested filter hook, ga_google_analytics_options_array. Should be available before WP v5.4 release. Thanks again @eclev91.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add filter to options’ is closed to new replies.