Error with Google Ads API on PHP when using segments.date

54 views
Skip to first unread message

andri...@gmail.com

unread,
Dec 22, 2021, 1:27:33 PM12/22/21
to AdWords API and Google Ads API Forum
Hello, I am having a problem when doing a query as follows

$query =
"SELECT metrics.impressions, segments.date FROM keyword_view WHERE segments.date BETWEEN '2019-01-01' AND '2020-01-01'";

Whenever I remove segments.date like this, it works:

$query =
"SELECT metrics.impressions FROM keyword_view WHERE segments.date BETWEEN '2019-01-01' AND '2020-01-01'";

What am I doing wrong? Laravel just stays blank, seems like a weird crash due to the library, everything else is working as intended

Thanks in advance!

Google Ads API Forum Advisor

unread,
Dec 23, 2021, 4:40:56 AM12/23/21
to andri...@gmail.com, adwor...@googlegroups.com
Hello,

Thanks for reaching out. Harry here, from the AdWords / Google Ads API Team.

Kindly provide the generated request and response logs upon executing both queries so I can check this on our end and assist you further? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.

Please provide the logs privately via the Reply to author option.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Tjtnq:ref
Reply all
Reply to author
Forward
0 new messages