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

44 views
Skip to first unread message

Hiro

unread,
Apr 27, 2023, 11:20:21 PM4/27/23
to Google Ads API and AdWords API Forum
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);  }

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,
Apr 28, 2023, 2:17:09 AM4/28/23
to Google Ads API and AdWords API Forum

【Additional Note】

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)


2023年4月28日金曜日 12:20:21 UTC+9 Hiro:

Google Ads API Forum Advisor

unread,
Apr 28, 2023, 6:01:09 AM4/28/23
to hiroki...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for raising this concern to the Google Ads API support team.

Regarding your concern, can you confirm if you want to get the lead form information via the Google Ads API? If so, then the report to be used in order to get the said data is the lead_form_submission_data report. Also, kindly note that the Google Ads API mirrors the Google Ads UI. Meaning, the API should mirror the data that can be seen in the UI. If you are indeed using the Google Ads API and you want to retrieve this data, can you send us the uncropped Google Ads UI screenshot so we can provide accurate suggestions to you?

On the other hand, you also mentioned Google Ads Scripts. If this happens to be a Google Ads Scripts implementation, then I would recommend reaching out to their support team via this forum link as they are better equipped to provide insights to this matter.

Links included in this email:
Regards,
Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2krGli:ref

Hiro

unread,
Apr 28, 2023, 6:56:06 AM4/28/23
to Google Ads API and AdWords API Forum

Thank you for getting back to me. As advised, I will first reach out to the Google Ads Scripts support team. 

Thank you also for providing the links.


2023年4月28日金曜日 19:01:09 UTC+9 Google Ads API Forum Advisor:

Google Ads API Forum Advisor

unread,
Apr 28, 2023, 9:43:02 AM4/28/23
to hiroki...@gmail.com, adwor...@googlegroups.com

Hello Hiro,

Thank you for updating us. Should you encounter future concerns directly with Google Ads API, do not hesitate to come back to us and we will be glad to assist you.

Regards,

Reply all
Reply to author
Forward
0 new messages