|
@@ -116,7 +116,7 @@ class IndexController extends Controller
|
|
|
* @param service An authorized Analytics Reporting API V4 service object.
|
|
|
* @return The Analytics Reporting API V4 response.
|
|
|
*/
|
|
|
-function getReport($analytics,$metrics) {
|
|
|
+function getReport($analytics,$arr) {
|
|
|
$VIEW_ID = "155703065";
|
|
|
// Create the DateRange object.
|
|
|
$dateRange = new \Google_Service_AnalyticsReporting_DateRange();
|
|
@@ -125,7 +125,7 @@ function getReport($analytics,$metrics) {
|
|
|
$metrics=[];
|
|
|
$dimensions=[];
|
|
|
|
|
|
- foreach($metrics as $k=>$v){
|
|
|
+ foreach($arr as $k=>$v){
|
|
|
$Metric = new \Google_Service_AnalyticsReporting_Metric();
|
|
|
$Metric->setExpression($v);
|
|
|
$Metric->setAlias($k);
|