MonsterInsights_GA_Lib_Service_Analytics_DataGa_Resource

The "ga" collection of methods.

Defined (1)

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

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