Automatically output lead form information from Google Ads to a spreadsheet.

320 views
Skip to first unread message

hiro

unread,
May 2, 2023, 4:54:52 AM5/2/23
to Google Ads Scripts Forum

Hi,

I would like to automatically export lead information from a Google Ads lead form to a Google Spreadsheet.

Source: One lead form on a Google Ads page (Ads & Assets > Assets > Lead Form)

Destination: Specified Spreadsheet


Question

I don't know the "column names" needed to output data from ⑥ to ⑨ from the following data.


①Submission Time (JST)

②Gclid

③Campaign Name

④Ad Group Name

⑤Full Name

⑥Company Name

⑦Work Email Address

⑧Work Phone Number

⑨Answer to "Please let us know what you're interested in." (a question set up individually)


What I tried

I created a Google Ads script , but I could only find and output the column names for ①-⑤ using "Reference Site ." However, I could not find the column names for ⑥-⑨.


Here is the code I have written in the Google Ads script. Please refer to the SELECT part


[File name: code.gs]

function main(){

  const ID1 = 'Spreadsheet ID';

  // Destination Spreadsheet name

  const SHEET_NAME_ADGROUP1 = 'Sheet Name';

 

  const spreadsheet = SpreadsheetApp.openById(ID1);

  const sheet1 = spreadsheet.getSheetByName(SHEET_NAME_ADGROUP1);

  const query1 = `

SELECT

lead_form_submission_data.gclid,    //②Gclid

ad_group.name,    //④Ad Group Name

campaign.name,   //③Campaign Name

lead_form_submission_data.submission_date_time //①Submission Time (JST)

lead_form_submission_data.lead_form_submission_fields//⑤Full Name

FROM lead_form_submission_data`;

const report1 = AdsApp.report(query1);

report1.exportToSheet(sheet1);  }


Reference Sites:

https://developers.google.com/google-ads/api/fields/v13/lead_form_submission_data_query_builder


I would appreciate your help in identifying the missing column names. Thank you.

hiro

unread,
May 2, 2023, 4:54:52 AM5/2/23
to Google Ads Scripts Forum
Hi,
I would like to automatically export lead information from a Google Ads lead form to a Google Spreadsheet.

Source: One lead form on a Google Ads page (Ads & Assets > Assets > Lead Form)
Destination: Specified Spreadsheet

Question
I don't know the "column names" needed to output data from ⑤ to ⑨ from the following data.

①Submission Time (JST)
②Gclid
③Campaign Name
④Ad Group Name
⑤Full Name
⑥Company Name
⑦Work Email Address
⑧Work Phone Number
⑨Answer to "Please let us know what you're interested in." (a question set up individually)


What I tried
I created a Google Ads script , but I could only find and output the column names for ①-④ using "Reference Site ." However, I could not find the column names for ⑤-⑨.

Here is the code I have written in the Google Ads script. Please refer to the SELECT part. 
File name: code.gs
*****************************

function main(){

  const ID1 = 'Spreadsheet ID';
 
  // Destination Spreadsheet name
  const SHEET_NAME_ADGROUP1 = 'Sheet Name';
 
  const spreadsheet = SpreadsheetApp.openById(ID1);
  const sheet1 = spreadsheet.getSheetByName(SHEET_NAME_ADGROUP1);
  const query1 = `
SELECT
lead_form_submission_data.gclid,    //②Gclid
ad_group.name,    //④Ad Group Name
campaign.name,   //③Campaign Name
lead_form_submission_data.submission_date_time //①Submission Time (JST)
FROM lead_form_submission_data`;
const report1 = AdsApp.report(query1);
report1.exportToSheet(sheet1);  }

*****************************

When testing with "lead_form_submission_data.lead_form_submission_fields," 

only the following name was outputted:


{fieldValue= 'Full Name of the Form Filler (the name entered by the submitter in the form)', fieldType=FULL_NAME}


It is unclear why the following information, which was also entered in the lead form, is not included in "lead_form_submission_data.lead_form_submission_fields":

⑥Company name

⑦Work email address

⑧Work phone number

⑨Response to "Please let us know the details of your service request." (a question set up separately)


Reference Sites:
https://developers.google.com/google-ads/api/fields/v13/lead_form_submission_data_query_builder

I would appreciate your help in identifying the missing column names. Thank you.hi

Google Ads Scripts Forum

unread,
May 3, 2023, 3:03:11 AM5/3/23
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/kbsecz4H0kk) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads Scripts Team

Google Ads Scripts Forum Advisor

unread,
May 3, 2023, 6:53:58 AM5/3/23
to adwords...@googlegroups.com

Hi,

 

Thank you for reaching out to the Google Ads Scripts team.

 

I'd like to inform you that the Google Ads Scripts utilizes the features of Google Ads API, and unfortunately, upon checking, the "Full Name", "Company Name", "Work Email Address", Work Phone Number and "Answer to "Please let us know what you're interested in." (a question set up individually)" are currently not retrievable via Ads API reporting. This means that this is also not yet supported via Ads Scripts.

 

Moving forward, kindly provide us with your CID as well as business use-case why you need to retrieve those information so we can check if this would be feasible with the Google Ads Scripts.

 

Regards,

Google Logo Google Ads Scripts Team


ref:_00D1U1174p._5004Q2l9jpj:ref

hiro

unread,
May 8, 2023, 1:23:30 AM5/8/23
to Google Ads Scripts Forum

Thank you for your response. As suggested, I will provide my Customer ID (CID).

I will contact the Customer Center(googleadsscr...@google.com.) instead,  because  I believe that it is not secure to share my CID on the Google Ads Scripts Forum. 


2023年5月3日水曜日 19:53:58 UTC+9 Google Ads Scripts Forum Advisor:

Google Ads Scripts Forum Advisor

unread,
May 8, 2023, 4:36:53 AM5/8/23
to adwords...@googlegroups.com

Hi Hiro,

 

This is to confirm that I have received the information we requested. Allow me to communicate this with the team if it is feasible via the Google Ads Scripts to retrieve those information. For any updates regarding this, kindly keep an eye on our blog post: https://ads-developers.googleblog.com/search/label/adwords_scripts

Visie Tubban

unread,
May 8, 2023, 8:08:48 AM5/8/23
to hiro 、グループ: Google Ads Scripts Forum
Good product 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 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/bb6c29e6-48ec-4ad4-b420-a0224fb158e4n%40googlegroups.com.

Google Ads Scripts Forum

unread,
May 9, 2023, 7:59:54 AM5/9/23
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/kbsecz4H0kk) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads Scripts Team

Google Ads Scripts Forum

unread,
May 9, 2023, 8:02:07 AM5/9/23
to Google Ads Scripts Forum
Hi Visie,

We appreciate your feedback. If you would need assistance from our team, just let us know, and we'd be happy to provide our support.

Best regards,
Google Ads Scripts Team

hara hiro

unread,
May 9, 2023, 9:05:34 PM5/9/23
to Google Ads Scripts Forum on behalf of adsscripts

Thank you for your reply. 

I understand that your team is currently investigating the issue.

I would appreciate it if you could reply to me once the investigation results are available. Thank you very much.

Best regards,


Hiro


2023年5月8日(月) 17:36 Google Ads Scripts Forum on behalf of adsscripts <adwords...@googlegroups.com>:
--
-- 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/kbsecz4H0kk/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/Wb7r8000000000000000000000000000000000000000000000RUBZX700HM_A9kiIQdaBpAjKPuISyA%40sfdc.net.

Google Ads Scripts Forum

unread,
May 10, 2023, 7:21:00 AM5/10/23
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/kbsecz4H0kk) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads Scripts Team

Google Ads Scripts Forum Advisor

unread,
May 10, 2023, 7:28:06 AM5/10/23
to adwords...@googlegroups.com

Hi Hiro,

 

I would like to clarify that this issue was raised a feature request for, however, as you would already know, there's no guarantee that it will be fulfilled anytime soon. Kindly be on the lookout for new updates and releases in Google Ads Scripts through our Ads Developer Blog as future updates and latest announcements would be posted there.

 

Let us know if we can assist you with anything else.

 

Relevant links:

 

Best regards,

hara hiro

unread,
May 14, 2023, 11:41:32 PM5/14/23
to Google Ads Scripts Forum on behalf of adsscripts
I am writing to inquire about the progress of our previous inquiry.
I would greatly appreciate it if you could provide me with an update on the matter and let me know when I can expect to receive a response.

Thank you very much for your time and attention to this matter. 
I look forward to hearing from you soon.

Best regards,
Hiro

2023年5月10日(水) 10:05 hara hiro <hiroki...@gmail.com>:

Google Ads Scripts Forum Advisor

unread,
May 15, 2023, 2:15:35 AM5/15/23
to adwords...@googlegroups.com

Hi Hiro,

 

Thank you for getting back.

 

Again, I would like to clarify that the concern which was previously brought to our team was raised a feature request for. It would be subject for review by our internal team if it's feasible to expose it via Google Ads Scripts. Furthermore, there's no guarantee that it will be fulfilled anytime soon and our team would be unable to provide a definite timeline with regard to it's release.

 

Kindly be on the lookout for new updates and releases in Google Ads Scripts through our Ads Developer Blog as future updates and latest announcements would be posted there. You may find the link for it below.

 

Relevant links:

 

Best regards,

 

Google Logo Google Ads Scripts Team


ref:_00D1U1174p._5004Q2l9jpj:ref
Reply all
Reply to author
Forward
0 new messages