monsterinsights_settings_links

Enhanced Link Attribution Settings.

Description

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

Parameters (1)

0. $var — Optional. (callback) => array( 'enhanced_link_attribution' => array( 'id' => 'enhanced_link_attribution', 'name' => __( 'Enable enhanced link attribution?', 'google-analytics-for-wordpress' ), 'desc' => sprintf( esc_html__( 'Add %1$sEnhanced Link Attribution%2$s to your tracking code.', 'google-analytics-for-wordpress' ), '', ' ' ), 'type' => 'checkbox', ), 'hash_tracking' => array( 'id' => 'hash_tracking', 'name' => __( 'Turn on anchor tracking (beta; see description)', 'google-analytics-for-wordpress' ), 'desc' => esc_html__( 'Many WordPress "1-page" style themes rely on anchor tags for navigation to show virtual pages. The problem is that to Google Analytics, these are all just a single page, and it makes it hard to get meaningful statistics about pages viewed. This experimental MonsterInsights feature allows for the tracking of anchor links as pages in Google Analytics. As a beta, first-look feature, we\'re adding a setting to turn this functionality on so we can collect feedback from people that want to use it. We may tweak or remove this feature at any time. Note: This feature tracks all anchor links as pages, without the ability to opt a particular anchor tag out currently, so only use this if you are using a "1-page" style WordPress theme', 'google-analytics-for-wordpress' ), 'type' => 'checkbox', ), 'allow_anchor' => array( 'id' => 'allow_anchor', 'name' => __( 'Turn on allowAnchor', 'google-analytics-for-wordpress' ), 'desc' => sprintf( esc_html__( 'This adds a %1$s call to your tracking code, and makes RSS link tagging use a %2$s as well.', 'google-analytics-for-wordpress' ), '_setAllowAnchor', '#' ), 'type' => 'checkbox', ), 'add_allow_linker' => array( 'id' => 'add_allow_linker', 'name' => __( 'Turn on allowLinker', 'google-analytics-for-wordpress' ), 'desc' => sprintf( esc_html__( 'This adds a %1$s call to your tracking code, allowing you to use %2$s and related functions.', 'google-analytics-for-wordpress' ), '_setAllowLinker', ' _link' ), 'type' => 'checkbox', ), 'tag_links_in_rss' => array( 'id' => 'tag_links_in_rss', 'name' => __( 'Turn on tag links in RSS', 'google-analytics-for-wordpress' ), 'desc' => sprintf( esc_html__( 'Do not use this feature if you use FeedBurner, as FeedBurner can do this automatically and better than this plugin can. Check %1$sthis help page%2$s for info on how to enable this feature in FeedBurner.', 'google-analytics-for-wordpress' ), '', '' ), 'type' => 'checkbox', ), )
The array.

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( 'monsterinsights_settings_links', $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_links callback 
  2. function filter_monsterinsights_settings_links( $var ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'monsterinsights_settings_links', 'filter_monsterinsights_settings_links', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'monsterinsights_settings_links', 'filter_monsterinsights_settings_links', 10, 1 ); 

Defined (1)

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

/includes/admin/settings/register-settings.php  
  1. 'links' => apply_filters('monsterinsights_settings_links',