The "ga" collection of methods.

Defined (1)

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

  1. class Google_DataGaServiceResource extends Google_ServiceResource { 
  4. /** 
  5. * Returns Analytics data for a profile. (ga.get) 
  6. * @param string $ids Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics profile ID. 
  7. * @param string $start_date Start date for fetching Analytics data. All requests should specify a start date formatted as YYYY-MM-DD. 
  8. * @param string $end_date End date for fetching Analytics data. All requests should specify an end date formatted as YYYY-MM-DD. 
  9. * @param string $metrics A comma-separated list of Analytics metrics. E.g., 'ga:visits, ga:pageviews'. At least one metric must be specified. 
  10. * @param array $optParams Optional parameters. 
  11. * @opt_param int max-results The maximum number of entries to include in this feed. 
  12. * @opt_param string sort A comma-separated list of dimensions or metrics that determine the sort order for Analytics data. 
  13. * @opt_param string dimensions A comma-separated list of Analytics dimensions. E.g., 'ga:browser, ga:city'. 
  14. * @opt_param int start-index An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. 
  15. * @opt_param string segment An Analytics advanced segment to be applied to data. 
  16. * @opt_param string filters A comma-separated list of dimension or metric filters to be applied to Analytics data. 
  17. * @return Google_GaData 
  18. */ 
  19. public function get($ids, $start_date, $end_date, $metrics, $optParams = array()) { 
  20. $params = array('ids' => $ids, 'start-date' => $start_date, 'end-date' => $end_date, 'metrics' => $metrics); 
  21. $params = array_merge($params, $optParams); 
  22. $data = $this->__call('get', array($params)); 
  23. if ($this->useObjects()) { 
  24. return new Google_GaData($data); 
  25. } else { 
  26. return $data;