Hello,
Thank you for reaching out to the Google Ads Scripts Team's Forum Channel.
Upon checking, I've observed that the query the script is using still conforms to the AdWords Query Language which the legacy version makes use of. Please do note that the legacy version is deprecated, and scripts still conforming to the said version will not perform as expected. Kindly note that, currently, Google Ads Scripts' reporting infrastructure is backed by the Google Ads API and uses the Google Ads Query Language. With this, we would recommend you migrate the script to the new script experience version to ensure continued functionality.
You may do so by following our migration guide. I've also included a link below for a report example. I believe the resource mapping documentation and our query migration tool are helpful when migrating queries, as it lists which Google Ads API field each resource field maps to. Since you're using the AD_PERFORMANCE_REPORT, this maps to the ad_group_ad report. Also, I've noticed that there are two fields for CampaignStatus which both filter to ENABLED; kindly only make use of one. After migrating your query, it results to the one below:
SELECT segments.ad_network_type, metrics.clicks, metrics.impressions, metrics.cost_micros FROM ad_group_ad WHERE campaign.status = 'ENABLED' AND campaign.advertising_channel_type = 'DISPLAY' AND ad_group_ad.status = 'ENABLED' AND segments.date DURING LAST_7_DAYS
Kindly make use of this query instead and let us know if an issue would persist along with your Google Ads account ID and the name of the script in the account so we're able to further investigate.
Reference links:
Best regards,
![]() |
Google Ads Scripts Team |
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/145e6f7d-6e84-4d46-8462-26c3013da6e6n%40googlegroups.com.
Hi All,
@Aswinik - Thank you for your insights. However, it appears that the error is not due to not placing a whitespace before DURING as the initial post has a whitespace before it, but rather the usage of the field `AdvertisingChannelType`. In order to resolve it, I would recommend utilizing the query in our team's previous response as it also conforms to the Google Ads Query Language.
If further assistance from our team is needed, please let us know. If an error would be encountered, kindly provide your Google Ads account ID or CID, the name of the script and a screenshot of the error so that we may be able to investigate further.