Fetch lead form data through GAQL

151 views
Skip to first unread message

Caio Motta

unread,
Mar 14, 2024, 9:54:30 PM3/14/24
to Google Ads API and AdWords API Forum
Hello, 

We are running campaigns with lead forms and wanted to pull leads submitted through these forms on a regular schedule.

Looking at the docs, it seemed that the way to do it was through GAQL report, but it seems that the lead data fetched is incomplete. We can only see data filled on custom fields all other fields are empty.

I have included below both query and response, please note fields as empty string or array are not redacted but the actual api response.

Thanks.

Query:
SELECT
  lead_form_submission_data.ad_group,
  lead_form_submission_data.ad_group_ad,
  lead_form_submission_data.asset,
  lead_form_submission_data.campaign,
  lead_form_submission_data.gclid,
  lead_form_submission_data.custom_lead_form_submission_fields,
  lead_form_submission_data.id,
  lead_form_submission_data.resource_name,
  lead_form_submission_data.lead_form_submission_fields
FROM lead_form_submission_data 

Response:
{
"lead_form_submission_data": {
    "resource_name": "customers/11111111/leadFormSubmissionData/aioaioai",
    "custom_lead_form_submission_fields": [
      {
        "question_text": "Redacted - Question 1",
        "field_value": "Redacted - Answer 1"
      },
      {
        "question_text": "Redacted - Question 2",
        "field_value": "Redacted - Answer 2"
      }
    ],
    "id": "",  
    "asset": "",
    "campaign": "",
    "lead_form_submission_fields": [],
    "ad_group": "",
    "ad_group_ad": "",
    "gclid": "",
    "submission_date_time": ""
  }
}

Reply all
Reply to author
Forward
0 new messages