Testing

Once the webhook is set up in Google Ads, we recommend you test if your CRM is set up correctly using the test functionality. Otherwise, you may not receive the lead data in your CRM system.

When constructing your lead form in Google Ads, you will see a test button below the webhook set-up:

Note that the set-up interface may look different if you are setting up a lead form on Search.

Once you hit the test button, a sample webhook request is sent to your configured webhook endpoint and a result is displayed. If the request was received successfully by your CRM and the HTML response status code from your system was 200, you will see a green status message:

To complete the test in such a case, please verify that your CRM has correctly received and parsed the sample payload. Without performing this step there is no guarantee that the webhook is working properly.

A sample of the payload that is sent is shown below. The actual request will contain only fields that were selected in the form:

Form fields selected in the example: Name, Phone, Email
Lead type: Test payload sent by webhook testing UI

{
  "lead_id":"Cj0KCQjwit_8BRCoARIsAIx3Rj7g-AeL6z35IWb6VYiZUygtTfwD3hDlgSGmY-XTTlK3lfV1wcuIwIAaAmMxEALw_wcB",
  "campaign_id":123456,
  "adgroup_id":0,
  "creative_id":0,
  "gcl_id":"Cj0KCQjwit_8BRCoARIsAIx3Rj7g-AeL6z35IWb6VYiZUygtTfwD3hDlgSGmY-XTTlK3lfV1wcuIwIAaAmMxEALw_wcB",
  "user_column_data": [
    {
      "column_name": "Full Name",
      "string_value":"FirstName LastName",
      "column_id": "FULL_NAME"
    },
    {
      "column_name":"User Phone",
      "string_value":"1-650-555-0123",
      "column_id":"PHONE_NUMBER"
    },
    {
      "column_name":"User Email",
      "string_value":"test@example.com",
      "column_id":"EMAIL"
    }],
  "api_version":"1.0",
  "form_id":123456789,
  "google_key":"testkey",
  "is_test":true
}

Please note that form_id field value will be set to the actual id of your form if you are performing a test on a form that is already saved. For unsaved forms, a dummy value will be provided.

Using curl command

You can use curl from your Mac or Linux command line.

  1. Choose a sample payload from Samples, and modify if required.
  2. Store it in a file (e.g., request.txt) on your machine.
  3. Run the following command on your command line:
    $ curl -v -X POST --header "Content-Type:application/json" -d @request.txt https://webhook_url