monsterinsights_frontend_output_analytics_src

The Google Analytics for WordPress by MonsterInsights monsterinsights frontend output analytics src hook.

Description

apply_filters( 'monsterinsights_frontend_output_analytics_src', (string) $www_google_analytics_com_analytics_js ); 

Parameters (1)

0. $www_google_analytics_com_analytics_js (string) => '//www.google-analytics.com/analytics.js'
The www google analytics com analytics js.

Usage

To run the hook, copy the example below.
  1. $www_google_analytics_com_analytics_js = apply_filters( 'monsterinsights_frontend_output_analytics_src', $www_google_analytics_com_analytics_js ); 
  2.  
  3. if ( !empty( $www_google_analytics_com_analytics_js ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the monsterinsights_frontend_output_analytics_src callback 
  2. function filter_monsterinsights_frontend_output_analytics_src( $www_google_analytics_com_analytics_js ) { 
  3. // make filter magic happen here... 
  4. return $www_google_analytics_com_analytics_js
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'monsterinsights_frontend_output_analytics_src', 'filter_monsterinsights_frontend_output_analytics_src', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'monsterinsights_frontend_output_analytics_src', 'filter_monsterinsights_frontend_output_analytics_src', 10, 1 ); 

Defined (2)

The filter is defined in the following location(s).

/includes/frontend/tracking/class-tracking-analytics.php  
  1. $src = apply_filters( 'monsterinsights_frontend_output_analytics_src', '//www.google-analytics.com/analytics.js' ); 
  1. $src = apply_filters( 'monsterinsights_frontend_output_analytics_src', '//www.google-analytics.com/analytics_debug.js' );