Skip to content

Commit

Permalink
WIP: Encoded Google Analytics report as JSON before returning
Browse files Browse the repository at this point in the history
  • Loading branch information
hs4man21 committed Nov 29, 2020
1 parent cff567b commit 6b26729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-content/plugins/tsd-json/tsd-json.php
Expand Up @@ -651,7 +651,7 @@ function tsd_json_plugin_return_most_viewed_posts() {

$body = new Google_Service_AnalyticsReporting_GetReportsRequest();
$body->setReportRequests( array( $request) );
return $analytics->reports->batchGet( $body );
return json_encode($analytics->reports->batchGet( $body ));
}

// https://stackoverflow.com/a/31275117/2603230
Expand Down

0 comments on commit 6b26729

Please sign in to comment.