|
@@ -76,10 +76,9 @@ class IndexController extends \app\controllers\HomeController
|
|
|
'dp'=>$store,
|
|
|
'dimensionArr'=>$v,
|
|
|
'metricArr'=>[
|
|
|
- 'itemQuantity'=>"ga:itemQuantity",
|
|
|
- 'transactions'=>"ga:transactions",
|
|
|
- 'transactionRevenue'=>"ga:transactionRevenue",
|
|
|
- 'pageviews'=>"ga:pageviews",
|
|
|
+ '销量'=>"ga:itemQuantity",
|
|
|
+ '订单量'=>"ga:transactions",
|
|
|
+ '订单金额'=>"ga:transactionRevenue",
|
|
|
],
|
|
|
'date'=>['start_at'=>$start_day,'end_at'=>$end_day]
|
|
|
];
|
|
@@ -318,6 +317,7 @@ class IndexController extends \app\controllers\HomeController
|
|
|
if(!$productName||!$store){
|
|
|
$this->json(0,[],'参数错误');
|
|
|
}
|
|
|
+ $productData=[];
|
|
|
$times=[
|
|
|
'hour'=>[
|
|
|
'date'=>'ga:dateHour',
|
|
@@ -340,12 +340,14 @@ class IndexController extends \app\controllers\HomeController
|
|
|
'销量'=>"ga:itemQuantity",
|
|
|
'订单量'=>"ga:transactions",
|
|
|
'订单金额'=>"ga:transactionRevenue",
|
|
|
+ 'pageviews'=>"ga:pageviews",
|
|
|
],
|
|
|
'date'=>['start_at'=>$start_day,'end_at'=>$end_day]
|
|
|
];
|
|
|
- $infoData[$k]=$ga->getData($productConfig);
|
|
|
+ $productData[$k]=$ga->getData($productConfig);
|
|
|
}
|
|
|
-
|
|
|
+ echo "<pre>";
|
|
|
+ print_r($productData);exit;
|
|
|
|
|
|
|
|
|
|