Oli Gardner
posted this on October 21, 2010 05:55 pm
A WebHook is just a push notification from our server to yours. The Form Submit WebHook lets you setup a push notification to your server every time someone submits a form on one of your Unbounce pages.
WebHooks make it easier to integrate two systems. The most common use for our Form Submit WebHook is to feed leads into your CRM. But there are lots of other things you could do as well, such as sending yourself an email or plotting addresses on Google Earth.
The very nature of a WebHook assumes that you have some ability to write code (or bribe a friend or colleague who does). You need to have a server that can accept a POST request (like what you’d get from a form submission), and be able to write a script that does something in response.

To connect your lead-gen form to your server, visit the “Lead-Gen Form Results” area on your landing page overview screen (below the A/B Test Centre) and click the Configure WebHook link. If you just want to test it out, you can use a PostBin URL (from www.postbin.org) as a place to temporarily send your form data and examine the data format.

Every time someone makes a new form submission on your page, Unbounce will send the following data to your selected URL.
Note:
| Parameter | Description |
|---|---|
| data.json |
The submitted form data in JSON format. For example: {
"full_name": ["Steve Jobs"],
"email_address": ["steve@apple.com"],
"earnings": ["More than you can possibly imagine"],
"what_would_you_like_our_product_to_do?": ["Dice", "Julienne Fries"],
"how_did_you_hear_about_us?": ["Can't Remember"],
"ip_address": "238.17.159.4"
}
|
| data.xml |
The submitted form data in XML format. For example: <?xml version='1.0'?>
<form_data>
<full_name>Steve Jobs</full_name>
<email_address>steve@apple.com</email_address>
<earnings>More than you can possibly imagine</earnings>
<what_would_you_like_our_product_to_do?>
<entry>Dice</entry>
<entry>Julienne Fries</entry>
</what_would_you_like_our_product_to_do?>
<how_did_you_hear_about_us?>Can't Remember</how_did_you_hear_about_us?>
<ip_address>238.17.159.4</ip_address>
</form_data>
|
| extra_data.json | If you have enabled RapLeaf, then you will get this field with extra data in JSON format. For example:
{
"rapleaf": {
"age": "25-35",
"location": "San Francisco, California, United States",
"gender": "Male"
}
}
|
| extra_data.xml | If you have enabled RapLeaf, then you will get this field with extra data in XML format. For example:
<?xml version='1.0'?>
<extra_data>
<rapleaf>
<age>25-35</age>
<location>San Francisco, California, United States</location>
<gender>Male</gender>
</rapleaf>
</extra_data>
|
| page_id | The identifier Unbounce uses to uniquely identify your page. Eventually you’ll be able to use this with our API to manipulate and get information about your page. This is a 36-character UUID, for example, “a2838d98-4cf4-11df-a3fd-00163e372d58″. |
| page_name | The name you gave your page, for example “My Guaranteed to Convert Landing Page”. |
| page_url | The URL of the page that contains your form. |
| variant | This identifies the page variant that the visitor saw when they visited your page, and will be a lower-case letter. The first variant is “a”, the next, “b”, and so on. If you have more than 26 variants the sequence will continue with “aa”, “ab”, etc. |
There's also a handy feature you can use to do some simple customization of the URL you're posting to. You can pass data from your form into parameters in the URL the webhook posts to. This is useful for doing simple mapping of form field names to field names expected by the target script.
Let's say you had a form with a "name" field in it, and you wanted to pass this along as a "customer_name" field. You could specify your webhook's "URL for POST" as follows:
http://mygreatcompany.com/some_script.php?customer_name=(name)
When a form is submitted, we'll replace the "(name)" token with the value of the name field from the form. You can add as many parameters as you like, just be aware that some servers have a limit for how long the query string can be.
Following is a simple PHP script that demonstrates how to accept a POST request from the webhook, and email the results.
Our webhooks will be posted to your servers using known IP addresses (either 54.241.34.25 or 50.19.99.184). You can optionally update your firewall rules to limit posts to your servers from these addresses.
Comments
Thanks for the guidance, found this useful while integrating.
Does anyone have any specific code samples for posting to SalesForce?
I found something here: http://colinloretz.com/2011/03/leadhooks-unbounce-and-salesforce-in...
Hi can you use the "URL Parameter Replacement" to parse values from one Unbounce Form to another Unbounce Form?
How about providing a sample script for posting over to ASP. NET?
I am looking for something along the same lines as James. I want to pass the email captured on the lead form into an email sign up box on the Thank You / Confirmation page.
Hi Michael, form values are now passed as query parameters to the confirmation dialog and can also be passed to another page. You see see how to set this up in the Forms and Form Data section of our user guide.
Does this work with intuit crm system?
Hi William, unfortunately although we cannot speak on the Intuit system directly hence the need for using a WebHook to send leads from an Unbounce page to Intuit, I will say that if you can configure the WebHook POST script as described in the article above, this should allow leads to successfully send from an Unbounce page to Intuit.
For the most part, just like other CRM systems, we would recommend on taking note of the data format that is accepted into Intuit and configure the WebHook as such to enable this integration. Examples depending on this format, are provided above.
Is there a way to pass variant, page_url, and a custom field (such as a checkbox value) with the parameter replacement method?
I've tried using "(variant)", "(page_url)", and "(custom_checkbox)", but they aren't passed in the post URL.
Oops -- correction, I DID get the custom field to pass. However, in the case of a checkbox, if nothing is checked (no value) then the value passed in the querystring is the token for that field, e.g. "¶meter=(my_checkbox)".
The variant and page_url would be a great win -- interestingly, ip_address does work while these others don't.
Anyone have success with a Constant Contact hook?
Has anyone been able to integrate Unbounce with Get Response?
Anyone have any guidance on how you would use this method with to send leads into marketo?