|
@@ -111,10 +111,10 @@ function getReport($analytics) {
|
|
|
$sessions->setAlias("sessions");
|
|
|
array_push($metrics,$sessions);
|
|
|
|
|
|
-// $users = new \Google_Service_AnalyticsReporting_Metric();
|
|
|
-// $users->setExpression("ga:users");
|
|
|
-// $users->setAlias("users");
|
|
|
-// array_push($metrics,$users);
|
|
|
+ $users = new \Google_Service_AnalyticsReporting_Metric();
|
|
|
+ $users->setExpression("ga:users");
|
|
|
+ $users->setAlias("users");
|
|
|
+ array_push($metrics,$users);
|
|
|
|
|
|
//跳出率
|
|
|
$bounceRate = new \Google_Service_AnalyticsReporting_Metric();
|
|
@@ -129,10 +129,10 @@ function getReport($analytics) {
|
|
|
array_push($metrics,$sessionDuration);
|
|
|
|
|
|
|
|
|
-// $hits = new \Google_Service_AnalyticsReporting_Metric();
|
|
|
-// $hits->setExpression("ga:hits");
|
|
|
-// $hits->setAlias("hits");
|
|
|
-// array_push($metrics,$hits);
|
|
|
+ $hits = new \Google_Service_AnalyticsReporting_Metric();
|
|
|
+ $hits->setExpression("ga:hits");
|
|
|
+ $hits->setAlias("hits");
|
|
|
+ array_push($metrics,$hits);
|
|
|
|
|
|
//交易阶段
|
|
|
$shoppingStage = new \Google_Service_AnalyticsReporting_Dimension();
|