historicalMetricsOptions in KeywordIdeas doesn't work

60 views
Skip to first unread message

Vadim

unread,
Jun 30, 2021, 2:24:56 AM6/30/21
to AdWords API and Google Ads API Forum
Hello, I am trying set the date range for KeywordIdeas as stated in the documentation (PHP)

$requestOptionalArgs['historicalMetricsOptions'] = new HistoricalMetricsOptions([
'yearMonthRange' => new YearMonthRange([
'start' => new YearMonth([
"year" => 2020,
"month" => Month::JANUARY
]),
'end' => new YearMonth([
"year" => 2020,
"month" => Month::MAY
])
])
]);

it doesn't work, returns an error: "Invalid message property: yearMonthRange".
Please tell me how to do it correctly.

Vladislav Tinishov

unread,
Jun 30, 2021, 2:50:27 AM6/30/21
to AdWords API and Google Ads API Forum
Похоже, что тебя игнорят
Можешь мне помочь с моим вопросом?

среда, 30 июня 2021 г. в 09:24:56 UTC+3, Vadim:

Google Ads API Forum Advisor

unread,
Jul 2, 2021, 12:56:48 PM7/2/21
to vad...@gmail.com, adwor...@googlegroups.com
Hi Vadim,

You can use the enum class MonthOfYear from our library, with the YearMonth and YearMonthRange classes and use our library to send the request. I have no visibility on your Month class.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2JXRUH:ref

Google Ads API Forum Advisor

unread,
Jul 2, 2021, 1:00:26 PM7/2/21
to vladisla...@gmail.com, adwor...@googlegroups.com
Hi Vladislav,

Thank you for reaching out to Google Ads API support. This product only officially offers support in English.  It would be best to reply in English if you can.  If not, we will try to use Google Translate to support you as best as we can. If you are looking for support accessing the Google Ads API, kindly open a new thread in this forum so that this thread will be dedicated to the original issue.
Reply all
Reply to author
Forward
0 new messages