|
@@ -78,14 +78,16 @@ class IndexController extends Controller
|
|
|
'productDetailViews'=>"ga:productDetailViews",
|
|
|
];
|
|
|
$i=1;
|
|
|
- $datas=array_chunk($metrics,6,true);
|
|
|
- foreach($datas as $data){
|
|
|
- $response = $this->getReport($analytics,$data);
|
|
|
+ $res=[];
|
|
|
+ $metrics=array_chunk($metrics,6,true);
|
|
|
+ foreach($metrics as $metric){
|
|
|
+ $response = $this->getReport($analytics,$metric);
|
|
|
// $this->printResults($response);
|
|
|
- $res=$this->getResults($response);
|
|
|
- echo "<pre>";
|
|
|
- print_r($res);
|
|
|
+ $data=$this->getResults($response);
|
|
|
+ $res=array_merge_recursive($res,$data);
|
|
|
}
|
|
|
+ echo "<pre>";
|
|
|
+ print_r($res);
|
|
|
exit;
|
|
|
return $this->render('index');
|
|
|
}
|