Unbounce
Integrate Surface forms with Unbounce landing pages
Overview
This guide will walk you through the process of integrating Surface forms with your Unbounce landing pages. You’ll learn how to add the Surface tag and configure a form to appear in a popup when users interact with specific buttons.
Integration Steps
Add Surface forms to your Unbounce landing pages.
Trigger via Email Input
Automatically show Surface forms when users submit their email through Unbounce forms.
Send Form Data to Surface Leads
Seamlessly sync Unbounce form submissions to Surface Leads using webhooks.
Prerequisites
- An active Unbounce account
- A published Surface Form & Unbounce landing page
Integration Steps
1. Access Your Unbounce Page
- Log in to your Unbounce account
- Navigate to your landing pages
- Select the page you want to edit
- Click “Edit Page” to enter the editor
2. Add Surface Tag & Form Script
- In the bottom toolbar, click the “JavaScript” button
- Click “Add New JavaScript”
- Add the following script:
- Make sure to replace the
SURFACE_FORM_URL
with your Surface form URL - Set the script placement to “Before the body Tag”
- Click “Done” to save the changes
This is how your script should look like
3. Configure Form Trigger Button
- Select any button on your page where you want the Surface form to appear
- In the sidebar, scroll to the bottom
- Under “Element Metadata”, set the class to
surface-form-button
Trigger via Email Input Submission
You can also trigger the Surface form when users submit an Unbounce form. Here’s how to set it up:
1. Update the Surface Form Script
Add the data-question-id
attribute to your Surface form script
2. Configure Unbounce Form
- In your Unbounce page editor, add a form element
- Select the form’s submit button
- In the sidebar, under “Element Metadata”, add the class
surface-form-button
Now, when users submit the Unbounce form, the Surface form will appear in a popup.
Send Unbounce Form Data to Surface Leads using Webhooks
You can automatically send form submissions from Unbounce to Surface Leads using webhooks. Here’s how to set it up:
1. Access Unbounce Webhook Settings
- Log in to your Unbounce account
- Select your project page
- Navigate to the “Integration” tab
- Click on “Add webhook” in the webhooks section
2. Get Surface Webhook URL
- Log in to your Surface account
- Navigate to Leads Hub from the sidebar
- Click on the “Configure” tab
- Locate the “Lead Submission Endpoint” section
- Copy the webhook URL from the cURL command provided
3. Configure Webhook in Unbounce
- Return to the Unbounce webhook configuration page
- Paste the Surface webhook URL you copied
- Set the Request Type to “JSON”
- Under “Map Fields”, match your Unbounce form fields to Surface lead fields:
- Map email field to
email
- Map first name to
firstName
- Map last name to
lastName
- Map company name to
company
- Map other relevant fields according to your form structure
- Map email field to
This is how your webhook configuration should look like
Available Surface Lead Fields
You can map Unbounce form fields to any of these Surface lead properties:
Field | Description |
---|---|
email | Required field for the lead’s email address |
firstName | Lead’s first name |
lastName | Lead’s last name |
company | Lead’s company name |
numberOfEmployees | Company size |
title | Lead’s job title |
phone | Lead’s phone number |
bookedMeeting | Meeting status |
linkedin | LinkedIn profile URL |
companyRevenue | Company’s revenue information |
Testing the Integration
After setting up the webhook:
- Submit a test form on your Unbounce page
- Check the Surface Leads Hub to verify the lead data is being received
- Review the webhook logs in Unbounce to troubleshoot any issues
Customization
You can customize the integration by:
- Changing the
popupSize
value to “small”, “medium”, or “large” - Modifying the
surface_target_element_class
to match your preferred class name - Updating the
surface_src
URL to point to your specific Surface form
Troubleshooting
If the form doesn’t appear:
- Verify that both scripts are properly added and placed before the body tag
- Check that the button has the correct class name (
surface-form-button
) - Ensure your Surface form URL and question ID are correct
- Check the browser console for any error messages