Posts tagged with awql

I'm trying to extract Search queries by certain rules and I need to get Queries that contain one of the given strings:

    " WHERE " +               " Impressions > " + IMPRESSIONS_THRESHOLD +        " AND AverageCpc > " + AVERAGE_CPC_THRESHOLD +        " AND Query CONTAINS_ANY ['for sale in', 'buy'] " +            " DURING YESTERDAY "); 

But I'm getting error message (tryed different variations):

One of the conditions in the query is invalid. (file Code.gs, line 19) 

Although it seems like I do everything according to Formal Grammar:

String           -> StringSingleQ | StringDoubleQ StringSingleQ    -> '(char)' StringDoubleQ    -> "(char)" StringList       -> [ String (, String)* ] 

If I do just 1 string it works fine:

 " WHERE " +               " Impressions > " + IMPRESSIONS_THRESHOLD +        " AND AverageCpc > " + AVERAGE_CPC_THRESHOLD +        " AND Query CONTAINS 'for sale in' " +             " DURING YESTERDAY "); 

I'm working on building a new tool for my customers that helps automate their ads and see daily / weekly reports and improvements. However, I'm having a humbling issue with the Google Ads API. I've set up a manager account, and my clients have given me access. However, it won't let me see their clicks. Google has ever so delicately told me that my manager account will not let me see their clicks within the API. I can see them in my dashboard. But I can't call them with my API. Am I not supposed to build a good report for my customers? Any query through manual requests on AWQL results the same. I don't know why I can't get their clicks/performance. Google's told me, "It's not me. It's you."

I have my Google Dev token. My own Oauth2 on my manager account. I thought the purpose of the manager account was so I could have the API. Have been reading for hours, but I'm missing something simple. What should I be requesting / authenticating with to get the clicks for my clients?

Signed, noob old developer working for 24 hours straight.

I am trying to download a SHOPPING_PERFORMANCE_REPORT with the following fields:

  • OfferId
  • ProductTitle
  • Brand
  • Date
  • Impressions

For a small subset of records I'm getting empty/blank data for OfferId, ProductTitle, and Brand (only Date and Impressions are not null). I want to exclude NULL OfferId and the filter: WHERE OfferID != '' doesn't seem to make any difference. How do I exclude NULL values from my report query??