GoogleGAL_Service_Analytics_ManagementGoals_Resource

The "goals" collection of methods.

Defined (1)

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

/core/Google/Service/Analytics.php  
  1. class GoogleGAL_Service_Analytics_ManagementGoals_Resource extends GoogleGAL_Service_Resource 
  2.  
  3. /** 
  4. * Gets a goal to which the user has access. (goals.get) 
  5. * @param string $accountId Account ID to retrieve the goal for. 
  6. * @param string $webPropertyId Web property ID to retrieve the goal for. 
  7. * @param string $profileId View (Profile) ID to retrieve the goal for. 
  8. * @param string $goalId Goal ID to retrieve the goal for. 
  9. * @param array $optParams Optional parameters. 
  10. * @return GoogleGAL_Service_Analytics_Goal 
  11. */ 
  12. public function get($accountId, $webPropertyId, $profileId, $goalId, $optParams = array()) 
  13. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'goalId' => $goalId); 
  14. $params = array_merge($params, $optParams); 
  15. return $this->call('get', array($params), "GoogleGAL_Service_Analytics_Goal"); 
  16.  
  17. /** 
  18. * Create a new goal. (goals.insert) 
  19. * @param string $accountId Account ID to create the goal for. 
  20. * @param string $webPropertyId Web property ID to create the goal for. 
  21. * @param string $profileId View (Profile) ID to create the goal for. 
  22. * @param GoogleGAL_Goal $postBody 
  23. * @param array $optParams Optional parameters. 
  24. * @return GoogleGAL_Service_Analytics_Goal 
  25. */ 
  26. public function insert($accountId, $webPropertyId, $profileId, GoogleGAL_Service_Analytics_Goal $postBody, $optParams = array()) 
  27. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody); 
  28. $params = array_merge($params, $optParams); 
  29. return $this->call('insert', array($params), "GoogleGAL_Service_Analytics_Goal"); 
  30.  
  31. /** 
  32. * Lists goals to which the user has access. (goals.listManagementGoals) 
  33. * @param string $accountId Account ID to retrieve goals for. Can either be a 
  34. * specific account ID or '~all', which refers to all the accounts that user has 
  35. * access to. 
  36. * @param string $webPropertyId Web property ID to retrieve goals for. Can 
  37. * either be a specific web property ID or '~all', which refers to all the web 
  38. * properties that user has access to. 
  39. * @param string $profileId View (Profile) ID to retrieve goals for. Can either 
  40. * be a specific view (profile) ID or '~all', which refers to all the views 
  41. * (profiles) that user has access to. 
  42. * @param array $optParams Optional parameters. 
  43. * @opt_param int max-results The maximum number of goals to include in this 
  44. * response. 
  45. * @opt_param int start-index An index of the first goal to retrieve. Use this 
  46. * parameter as a pagination mechanism along with the max-results parameter. 
  47. * @return GoogleGAL_Service_Analytics_Goals 
  48. */ 
  49. public function listManagementGoals($accountId, $webPropertyId, $profileId, $optParams = array()) 
  50. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId); 
  51. $params = array_merge($params, $optParams); 
  52. return $this->call('list', array($params), "GoogleGAL_Service_Analytics_Goals"); 
  53.  
  54. /** 
  55. * Updates an existing view (profile). This method supports patch semantics. 
  56. * (goals.patch) 
  57. * @param string $accountId Account ID to update the goal. 
  58. * @param string $webPropertyId Web property ID to update the goal. 
  59. * @param string $profileId View (Profile) ID to update the goal. 
  60. * @param string $goalId Index of the goal to be updated. 
  61. * @param GoogleGAL_Goal $postBody 
  62. * @param array $optParams Optional parameters. 
  63. * @return GoogleGAL_Service_Analytics_Goal 
  64. */ 
  65. public function patch($accountId, $webPropertyId, $profileId, $goalId, GoogleGAL_Service_Analytics_Goal $postBody, $optParams = array()) 
  66. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'goalId' => $goalId, 'postBody' => $postBody); 
  67. $params = array_merge($params, $optParams); 
  68. return $this->call('patch', array($params), "GoogleGAL_Service_Analytics_Goal"); 
  69.  
  70. /** 
  71. * Updates an existing view (profile). (goals.update) 
  72. * @param string $accountId Account ID to update the goal. 
  73. * @param string $webPropertyId Web property ID to update the goal. 
  74. * @param string $profileId View (Profile) ID to update the goal. 
  75. * @param string $goalId Index of the goal to be updated. 
  76. * @param GoogleGAL_Goal $postBody 
  77. * @param array $optParams Optional parameters. 
  78. * @return GoogleGAL_Service_Analytics_Goal 
  79. */ 
  80. public function update($accountId, $webPropertyId, $profileId, $goalId, GoogleGAL_Service_Analytics_Goal $postBody, $optParams = array()) 
  81. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'goalId' => $goalId, 'postBody' => $postBody); 
  82. $params = array_merge($params, $optParams); 
  83. return $this->call('update', array($params), "GoogleGAL_Service_Analytics_Goal");