So, I have successfully established a connection with Google Adwords, but I don’t understand what the request should look like in order to cost ads over time. What parameters should be used? I was hoping to find a simpler solution, like api calls made in Google Analytics:
public function getAudienceMetricsAll($google_analytics_account_id)
{
$curl = new Curl("https://www.googleapis.com/analytics/v3/data/ga");
$curl->setParams([
"ids" => "ga:" . $google_analytics_account_id,
"dimensions" => "ga:date",
"metrics" => "ga:users,ga:newUsers,ga:percentNewSessions,ga:sessions,ga:bounces,ga:bounceRate,ga:avgSessionDuration,ga:goalStartsAll,ga:pageviews,ga:pageViewsPerSession",
"start-date" => "730daysAgo",
"end-date" => "today",
"max-results" => 10000
]);
$curl->setHeaders([
"Authorization" => "Bearer " . @$this->aim_account->settings["credentials"]["access_token"]
]);
$data = $curl->sendRequest("json");
return $data;
}
I mean, only url and params I need to send to the request body. But I seem to be unable to find such information.
Thank you for your time! Any help is appreciated!
Alan source
share