monsterinsights_google_app_config

The Google Analytics for WordPress by MonsterInsights monsterinsights google app config function.

Description

monsterinsights_google_app_config(); 

Usage

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

Defined (1)

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

/lite/includes/google.php  
  1. function monsterinsights_google_app_config() { 
  2. // We'll go ahead and ask for these permissions on new installs 
  3. $scopes = array(  
  4. 'https://www.googleapis.com/auth/analytics.readonly',  
  5. 'https://www.googleapis.com/auth/analytics',  
  6. // 'https://www.googleapis.com/auth/analytics.manage.users',  
  7. // 'https://www.googleapis.com/auth/tagmanager.readonly',  
  8. // 'https://www.googleapis.com/auth/webmasters.readonly' 
  9. ); 
  10. $config = array( 
  11. 'application_name' => 'Google Analytics by MonsterInsights',  
  12. 'client_id' => '346753076522-21smrc6aq0hq8oij8001s57dfoo8igf5.apps.googleusercontent.com',  
  13. 'client_secret' => '5oWaEGFgp-bSrY6vWBmdPfIF',  
  14. 'redirect_uri' => 'urn:ietf:wg:oauth:2.0:oob',  
  15. 'scopes' => $scopes,  
  16. ); 
  17.  
  18. $config = apply_filters( 'monsterinsights_lite_google_app_config', $config ); 
  19. $config['scopes'] = $scopes; // Scopes requested are not changeable to minimize breakage. 
  20. return $config;