Hello Nikolai,
I’m James from the Google Ads scripts support team. Thank you for reaching out to us.
Can you please provide us with the following information below so that we can further investigate?
Regards,
|
||||||
|
||||||
Hello Zunair,
It appears that you have already raised this issue on a separate thread that you have created in our private channel, and I believe that I have already addressed this issue. Having said that, let me reiterate my response for better visibility.
Upon checking with the given testing code, I observed that your script implementation is fine. However, I took a closer look at your campaign, ads and keyword, and I observed that you’re using video campaigns, responsive video ads and video keywords which can’t be retrieved using the selectors that you declared in your script. That’s the main reason why you’re retrieving 0 data upon executing your script.
Having said that, I suggest that you use VideoCampaignSelector to retrieve your video campaigns, VideoAdSelector to retrieve your responsive video ads and VideoKeywordSelector to retrieve your video keywords. See sample code implementation below.
function main() { var campaignIterator = AdsApp.videoCampaigns().withCondition("campaign.status = ENABLED").get(); var enabledCampaigns = campaignIterator.totalNumEntities(); Logger.log('Enabled Campaigns: '+enabledCampaigns); var ads = AdsApp.videoAds().get(); console.log('Ads: '+ ads.totalNumEntities()); var campaigns = AdsApp.videoCampaigns(); console.log('Campaigns: '+campaigns.get().totalNumEntities()); var keywords = AdsApp.videoTargeting() .keywords() .forDateRange('LAST_MONTH') .get(); console.log('Keywords: '+keywords.totalNumEntities()); }
Can you please try it on your end and let me know if you have any questions.
Regards,
|
||||||
|
||||||
|
||||||
Hi Petra,
Just circling back to this thread. I'd like to inform you that the error messages have been fixed to provide more information on where the issue or error is located once one occurs.
Let us know if we can assist you with anything else.
Best regards,
Google Ads Scripts Team |