monsterinsights_settings_demographics

Demographics Settings.

Description

apply_filters( 'monsterinsights_settings_demographics', (callback) $var ); 

Parameters (1)

0. $var — Optional. (callback) => array( 'demographics' => array( 'id' => 'demographics', 'name' => __( 'Enable Demographics and Interests Reports for Remarketing and Advertising', 'google-analytics-for-wordpress' ), 'desc' => sprintf( esc_html__( 'Check this setting to add the Demographics and Remarketing features to your Google Analytics tracking code. Make sure to enable Demographics and Remarketing in your Google Analaytics account. We have a guide for how to do that in our %1$sknowledge base%2$s. For more information about Remarketing, we refer you to %3$sGoogle\'s documentation%2$s.', 'google-analytics-for-wordpress. Note that usage of this function is affected by privacy and cookie laws around the world. Be sure to follow the laws that affect your target audience.' ), '', '', '' ), 'type' => 'checkbox', ), 'anonymize_ips' => array( 'id' => 'anonymize_ips', 'name' => __( 'Anonymize IP addresses?', 'google-analytics-for-wordpress' ), 'desc' => sprintf( esc_html__( 'This adds %1$s, telling Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage.', 'google-analytics-for-wordpress' ), '_anonymizeIp' ), 'type' => 'checkbox', ), )
The array.

Usage

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

Defined (1)

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

/includes/admin/settings/register-settings.php  
  1. 'demographics' => apply_filters('monsterinsights_settings_demographics',