Ad Performance Report Script

324 views
Skip to first unread message

Linda Corzo

unread,
Oct 3, 2022, 8:00:49 PM10/3/22
to Google Ads Scripts Forum
Hello,

I'm using the script from this page: https://developers.google.com/google-ads/scripts/docs/solutions/ad-performance and it's working, but every time the script runs it creates the data in a new sheet. 

Is it possible instead to overwrite the data in the specified template sheet and not create a new one every single time? 

Thanks!

Mike Rhodes

unread,
Oct 5, 2022, 3:08:27 AM10/5/22
to Google Ads Scripts Forum
Yes it's possible - but you'd have to change a few bits of the code (to clear the sheet, to tell it which sheet/tab to use, possibly more that I'm not thinking of...!)

Google Ads Scripts Forum Advisor

unread,
Oct 5, 2022, 11:20:57 PM10/5/22
to adwords...@googlegroups.com

Hello,

I’m James from the Google Ads scripts support team. Thank you for contacting us.

I concur with Mike that it is possible.  I made some adjustments to our solution script in order for it to overwrite data in an existing spreadsheet. That said, can you please try to implement the attached script below and let me know how it goes on your end?

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2exZQJ:ref
Ad performance - Adjusted.txt

Linda Corzo

unread,
Oct 6, 2022, 2:26:09 PM10/6/22
to Google Ads Scripts Forum on behalf of adsscripts
Hi James,

Thank you for sharing this, unfortunately, this is the error code I am receiving:


10/6/2022 2:20:28 PMUsing template spreadsheet - https://docs.google.com/spreadsheets/d/1acE4CyRU5ri0_imq27vO3XAtFmBdXdRgHUUT-Lvxz8c/edit#gid=12.
10/6/2022 2:20:33 PMTypeError: segments is not iterable at outputSegmentation (Code:213:29) at main (Code:108:5)


Also, is there a way to see this by campaigns or campaign types?

Thank you for all your help, very much appreciated!

Linda Corzo

unread,
Oct 14, 2022, 9:24:52 PM10/14/22
to Google Ads Scripts Forum on behalf of adsscripts
Hi James,

Is there a reason that the script isn't working?

Also, is there a way to see this by campaigns or campaign types?

Thank you for all your help!

Google Ads Scripts Forum Advisor

unread,
Oct 17, 2022, 3:31:19 AM10/17/22
to adwords...@googlegroups.com

Hello,

Can you please share with us the following items below so that we can further check the issue?

  • Google Ads Account  ID / CID
  • Script name

On the other hand, regarding your additional question, could you please provide more details to it so that we can provide an accurate response?

Regards,

Linda Corzo

unread,
Oct 26, 2022, 5:56:19 PM10/26/22
to Google Ads Scripts Forum on behalf of adsscripts
Hi James,

Please see below:

In regards to my question, I was wondering if we can segment this report further by campaign or campaign type.

Thank you!

--
-- 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 a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/D4XqEy2927w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/NsmO6000000000000000000000000000000000000000000000RJVZJS00MddeMifQQPGDB0zfGUVuiQ%40sfdc.net.


--

Maxime Grimler

unread,
Nov 4, 2022, 6:59:02 PM11/4/22
to Google Ads Scripts Forum
Hey Linda,

You need to replace this line 
return adGroupAd.ad.responsiveDisplayAd.longHeadline

by this line

return adGroupAd.ad.responsiveDisplayAd.longHeadline.text;

For the responsive display ad, the longHeadline has to be returned as text format and not as object, this will solve your issue with "segments is not iterable"

Regards,

Linda Corzo

unread,
Nov 6, 2022, 1:59:05 PM11/6/22
to Maxime Grimler via Google Ads Scripts Forum
Hi Maxime,

Thank you, that worked! My question was if there was a way to segment the headlines further by campaign or campaign type.

Appreciate your help!

--
-- 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 a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/D4XqEy2927w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.

Linda Corzo

unread,
Nov 21, 2022, 9:10:49 PM11/21/22
to Google Ads Scripts Forum on behalf of adsscripts
Hi James,

Just wanted to follow up and see if we can segment this report further by campaign or campaign type.

Thanks!

Google Ads Scripts Forum Advisor

unread,
Nov 22, 2022, 2:48:29 AM11/22/22
to adwords...@googlegroups.com

Hello,

I believe that it is feasible to segment your report by campaign name or campaign type. You just need to add the campaign.name or campaign.advertising_channel_type field as a filter within the GAQL query under processAccount function.

Let me know if you have any further questions.

Regards,

Reply all
Reply to author
Forward
0 new messages