monsterinsights_events_tracking

Get frontend tracking options.

Description

(array) monsterinsights_events_tracking(); 

This function is used to return an array of parameters for the frontend_output() function to output. These are generally dimensions and turned on GA features.

Returns (array)

Array of the options to use.


Usage

  1. if ( !function_exists( 'monsterinsights_events_tracking' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/frontend/frontend.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = monsterinsights_events_tracking(); 
  7.  

Defined (1)

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

/includes/frontend/frontend.php  
  1. function monsterinsights_events_tracking( ) { 
  2. $events_mode = monsterinsights_get_option( 'events_mode', false ); 
  3. $tracking_mode = monsterinsights_get_option( 'tracking_mode', 'analytics' ); 
  4.  
  5. if ( ! $disabled_user && $events_mode === 'php' && ( $tracking_mode === 'ga' || $tracking_mode === 'analytics' ) ) { 
  6. require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/events/class-events-php.php'; 
  7. } else if ( ! $disabled_user && $events_mode === 'js' && $tracking_mode === 'analytics' ) { 
  8. require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/events/class-events-js.php'; 
  9. } else { 
  10. // User is in the disabled group or events mode is off