How can we help you?

Integrating with Webhooks

webhooks.png

What’s a WebHook?

WebHook is a push notification from our server to yours. The Form Submit WebHook lets you set up a push notification to your server every time someone submits a form on one of your Instapage pages.

What can you do with a WebHook?

WebHooks make it easier to integrate two systems. The most common use for our Form Submit WebHook is to feed leads into your CRM.

What do you need?

Some CRMs will offer something called "an endpoint URL" which you can use to integrate with, which requires no technical knowledge and is very easy to set up.

Configure the Webhook

1. While in the Landing Pages list, click on the name of the desired page and select Integrations > Form Integrations:

integrations slider.gif

2. Select an already connected Webhook endpoint URL. If you don't have one, you will see the message below. In that case, go to connect a new one in the main Integrations dashboard by selecting the workspace you want, Settings, then clicking Integrations.

No_integration_error.png

webhooks integration.gif

3. Enter your endpoint URL. This step is done once per workspace.

Screen_Capture_on_2023-02-21_at_17-12-27.gif

When you have connected the endpoint, come back to the slideout menu for the page you want to integrate with Webhooks and continue with the steps below.

Important note: The endpoint URL must be 255 characters or under. 

4. Connect the Webhook to the page. Enter your server's token authorization key (also known as bearer authentication) if you have one.

webhook authorization key.gif

This will add your token authorization key in the header of the webhook request as an Authorization header.

If this method is not available for you, and instead you need to whitelist IPs, you can find our list here: https://d.pr/nGODXv.

5. Select the sending method and click Continue;

Screenshot_on_2023-02-21_at_17-27-00.png

6. Now you will need to map your Instapage form fields to your Webhooks fields;

Screenshot_on_2023-02-21_at_17-31-13.png

When you map your fields, make sure that you are using the exact name of the fields from your system side so that when Instapage sends the data to your system, it will recognize the field names and accept the lead.

If you map an Instapage field with a field from your CRM side that has predefined options/values, then the field from Instapage side must have those exact same predefined options/values, and it is recommended for the fields from both sides to be of the same type.

7. You can also capture more information about your visitors and send it to your list. Just make sure to match your fields accordingly.

Screenshot_on_2023-02-21_at_19-39-46.png

You can track and send the following data from your funnel:
  • Page
  • Variation
  • Desktop/Mobile
  • Timestamp
  • IP Address
  • Referral Source
  • Ad Campaign (Available for Convert accounts only)
  • Average Cost per Visitor (Available for Convert accounts only)
If you want to test the Webhook integration, you can use a PostBin URL (from https://requestbin.com/) as a place to temporarily send your form data and examine the data format.
In case you have the fields from the session data already in your form, you should remove those fields from the session data step by simply deleting the field name during the configuration.
If you don’t need all the session data fields captured for your leads, please leave the “Webhook Fields” section from the screenshot above blank for them.
NOTE:  In order for the Referral Source session data field to work in Google Chrome as well, you need to enable the related toggle found in the Session step, pictured below.
Screenshot_on_2023-02-21_at_19-40-09.png
NOTE: Safari has the option to Prevent cross-site tracking enabled by default, which means the Referral Source will not work for leads who submit the form on Safari. They can manually turn that option off, but it is strictly dependent on the end user (the page visitor).
8. Click on Finish. If you went through all the steps, you should see a confirmation message.

Then click on CLOSE.

In order for the changes to save on the page, you still need to update the experience. So after clicking on CLOSE, head back to the first-page slide-out to UPDATE the page experience.

Screen_Capture_on_2023-02-21_at_19-44-28.gif
 Note: We do not impose a limit of one Webhook per page, so you can go ahead and connect multiple endpoints to a single page if that serves your use case.

After completing/saving an integration, hit the orange Update button for the page so that the changes go live.

 

If you want to integrate using Webhooks with your own custom server instead of an online lead management system you will have to write code to accept your form data.

Every time someone makes a new form submission on your page, Instapage will send the following data to your selected URL.

Parameter Description
ip Ip of visitor.
page_id The identifier Instapage uses to uniquely identify your page. 
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.

Sample PHP Script

 Keep in mind the following particularities that our webhook integration has:
- Webhook domains that point to localhost addresses cannot work with our system,
- When Instapage makes the webhook call, it will send the lead data as a single object data set. If your system only accepts a list of objects data set, then the leads from Instapage will not be accepted by them.
- The server that is handling the Webhook endpoint URL needs to have a response time of a maximum of 20 seconds for processing Webhook calls. Otherwise, the form "thank you message" or the redirect will not work and it may even affect the integration. 

Additional Recommendations for Webhook Integration

To ensure your Webhook setup works correctly and efficiently, here are a few important recommendations:

1. Double-check your configuration

Ensure all your webhook settings are correct to avoid any issues with lead processing.

2. Use HTTPS for secure connections

Always use HTTPS for your endpoint URL to safeguard your data, authenticate the connection, and protect against potential security threats.

3. Handle Session Data fields carefully

Consider making visitor session data fields not required in your CRM to avoid issues if these fields are missing in future leads. If you prefer to keep them required, you could set a default value (e.g., "Direct") if any of these fields are empty. However, this would require custom code and may need a developer's assistance to implement.

4. Avoid excessive special characters in Field Names

Depending on your setup, special characters in field names may cause issues during processing. It's best to stick with simpler, cleaner names like "What is your role?" instead of "<I am a.…?>" If you need to use special characters, be sure to test thoroughly.

5. Clear cache regularly on WordPress or Drupal

If your Instapage page is published on WordPress or Drupal, please ensure the cache is cleared regularly to prevent caching-related issues, which may lead to outdated data being sent to your CRM.

6. The integration only works on the live URL

It can not be tested in preview mode. When testing the live URL, ensure your browser is not displaying an older cached version.

7. Always Update the page after changing, adding, or removing a Webhook endpoint.

8. Test the integration with real and distinct email addresses

Some systems recognize fake emails, and if you submit the form multiple times with the same email address, the integration will flag the email as spam. 

9. All fields need to have a label/name for the integration to work

Please do not leave the label empty or with just space characters. You can pick the 'hide label' option for some field types.

Need further help?

Tell us what you need and we will be happy to assist you.

Submit a Request