Google_Service_Analytics_DataGa_Resource

The "ga" collection of methods.

Defined (1)

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

/lib/vendor/google/apiclient/src/Google/Service/Analytics.php  
  1. class Google_Service_Analytics_DataGa_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Returns Analytics data for a view (profile). (ga.get) 
  5. * @param string $ids 
  6. * Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is 
  7. * the Analytics view (profile) ID. 
  8. * @param string $startDate 
  9. * Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM- 
  10. * DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. 
  11. * @param string $endDate 
  12. * End date for fetching Analytics data. Request can should specify an end date formatted as YYYY- 
  13. * MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 
  14. * yesterday. 
  15. * @param string $metrics 
  16. * A comma-separated list of Analytics metrics. E.g., 'ga:sessions, ga:pageviews'. At least one 
  17. * metric must be specified. 
  18. * @param array $optParams Optional parameters. 
  19. * @opt_param int max-results 
  20. * The maximum number of entries to include in this feed. 
  21. * @opt_param string sort 
  22. * A comma-separated list of dimensions or metrics that determine the sort order for Analytics 
  23. * data. 
  24. * @opt_param string dimensions 
  25. * A comma-separated list of Analytics dimensions. E.g., 'ga:browser, ga:city'. 
  26. * @opt_param int start-index 
  27. * An index of the first entity to retrieve. Use this parameter as a pagination mechanism along 
  28. * with the max-results parameter. 
  29. * @opt_param string segment 
  30. * An Analytics segment to be applied to data. 
  31. * @opt_param string samplingLevel 
  32. * The desired sampling level. 
  33. * @opt_param string filters 
  34. * A comma-separated list of dimension or metric filters to be applied to Analytics data. 
  35. * @opt_param string output 
  36. * The selected format for the response. Default format is JSON. 
  37. * @return Google_Service_Analytics_GaData 
  38. */ 
  39. public function get($ids, $startDate, $endDate, $metrics, $optParams = array()) 
  40. $params = array('ids' => $ids, 'start-date' => $startDate, 'end-date' => $endDate, 'metrics' => $metrics); 
  41. $params = array_merge($params, $optParams); 
  42. return $this->call('get', array($params), "Google_Service_Analytics_GaData");