function ga_stats_ga_data_array in Google Analytics Statistics 7
Same name and namespace in other branches
- 7.2 includes/ga.inc \ga_stats_ga_data_array()
- 7.x inc/ga.inc \ga_stats_ga_data_array()
Preprocess the retrieved data.
This should be merged into the other transform function so we only do one rearrangement.
Parameters
$data_in:
Return value
array
1 call to ga_stats_ga_data_array()
- ga_stats_ga_data in includes/
ga.inc - Use the client library to query GA for fresh data.
File
- includes/
ga.inc, line 177
Code
function ga_stats_ga_data_array($data_in) {
$data_all = array();
foreach ($data_in as $d) {
$metrics = $d
->getMetrics();
$dimensions = $d
->getDimensions();
$data_all[] = array_merge($metrics, $dimensions);
}
return $data_all;
}