Data Soap
> UNBOUNCE

Data Soap + Unbounce

Unbounce lets you build custom landing pages, often for lead generation. Data Soap validates the phone numbers and email addresses entered into your Unbounce forms live, as visitors type.

First, create a Public API token from your Data Soap account under Profile → API Authentication, with the domain of your landing page set as the token's origin.

1. Add the JavaScript

  1. In Unbounce, click Add JavaScript.
  2. Paste in the snippet below, replacing the token placeholder with your own.
JavaScript
<script type="text/javascript">
// Global config
var dsConfig = {
token: "Insert Token Here",
connectionErrorsPassValidations: false,
highlightSuccess: true, // valid emails/numbers get a green border
allowTemporaryErrors: false, // risky in rare cases, but avoids blocking on a temporary network issue
email: {
enabled: true,
msg: "Email address is invalid",
allowDisposable: false,
},
mobile: {
enabled: true,
msg: "Phone number is invalid",
},
landline: { // UK only
enabled: true,
msg: "Phone number is invalid",
},
};
// Validates each field on change, using dsConfig above, and calls the Data Soap
// API directly from the browser with your public token.
</script>
  1. Name it “Data Soap”.
  2. Set the placement to “Before Body End Tag”.
  3. Click Done.

2. Add the CSS

This styles the field border to match a valid or invalid result.

  1. Click Add Stylesheet.
  2. Paste in the CSS below.
CSS
<style>
.dsError {
border-color: rgba(232, 65, 24, 1) !important;
background: rgba(232, 65, 24, 0.15) !important;
color: rgb(232, 65, 24) !important;
}
.dsSuccess {
border-color: rgba(68, 189, 50, 1) !important;
}
</style>

Click Done - your integration is now live.

Fields are validated against https://api.datasoap.co.uk using your token, with results styled via the .dsError / .dsSuccess classes above.

Back to integrations