Need Postal code level data in the google sheet using google ads Script

48 views
Skip to first unread message

Sharatchandu aml

unread,
Oct 29, 2025, 7:43:13 PMOct 29
to Google Ads Scripts Forum
Hi,

I have developed a script to pull monthly postal code–level data along with the account name. However, when I run the script, it doesn’t generate any data in the Google Sheet.

I’ve attached the script and a screenshot showing the required data from Google Ads.
Please review them and suggest the correct columns and dimensions, and help me fix the issue.


Thanks,
Sharat
Google ads script - postal code.txt
Screenshot 2025-10-29 232805.png

Google Ads Scripts Forum Advisor

unread,
Oct 30, 2025, 12:08:54 AMOct 30
to adwords...@googlegroups.com
Hi Sharat,
 
Thank you for reaching out to the Google Ads Scripts support team.
 
Please be informed that I have removed your response from the forums as it contains the PII information.
 
Based on the provided information, I understand that you are unable to retrieve the postal code data into a spreadsheet using the script that you have created. Upon checking the account '712-211-4525', I could see that you are referring to the script 'Zip Code' and the account is an MCC account. I have reviewed the script that you have created and I could see that the report geo_target_view that you are using is not the correct one. You should use the geographic_view report to retrieve the postal code data that you have shared in the provided screenshot. Please refer to the correct GAQL query shared below to retrieve the data that you want:
SELECT segments.geo_target_postal_code, geographic_view.resource_name, 
segments.month, segments.date FROM geographic_view WHERE segments.date 
BETWEEN '2025-10-01' AND '2025-10-29'"
 Additionally, you can utilize the Google Ads Query Builder and Query Validator to build and validate the queries for retrieving the data from the Google Ads API. So, I suggest you please modify your script by including the above given GAQL query and use the correct date segments for which you wants to retrieve the data. 
 
If you still need any further assistance, I request you kindly share the following details to assist you further:
 
  • Google Ads client customer ID under which the script is present.
  • Shareable spreadsheet link you are using in the script. You may refer to this article to share a file publicly.
You can send the details via Reply privately to the author option, or direct private reply to this email.
 

Thanks,
 
Google Logo Google Ads Scripts Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-10-30 04:08:16Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vSClE:ref" (ADR-00337294)



Mehdi Maaiate

unread,
Oct 30, 2025, 5:00:47 AMOct 30
to Google Ads Scripts Forum
Hi how can i help you what problem are you facing i available for find the best solutions 

Sharatchandu aml

unread,
Oct 31, 2025, 6:23:49 PMOct 31
to Google Ads Scripts Forum

Hi Mehdi,

Could you please share a Google Ads script that pulls data into Google Sheets with the following columns: Month, Account Name, Zip Code, and Cost? (refer attached Screen shot) 

It would be a great help, and I really appreciate your support.

Thanks,
Sharat
Reply all
Reply to author
Forward
0 new messages