Connecting Unbounce to LeadByte
This article aims outline the ways in which you can transfer leads from Unbounce to LeadByte.We shall cover the following:1. How to submit leads to our API using the Unbounce Webhook integration2. Field mapping (Unbounce Form and page data, Custom fields)3. Unbounce custom end-point in LeadByte
Webhook
Under Unbounce integrations you have the ability to create a Webhook. Using the JSON option you can post to our API. You just need to be sure that you have a Admin or Supplier key created in LeadByte which you can generate when creating an integration guide for your Campaign under Campaigns > Integration. Do setup a Webhook successfully you need your LeadByte Posting URL and Header Key (example below).
Field Mapping
Unbounce automatically includes Form and Page data in the payload. To store this data in LeadByte you need to map to the respective LeadByte field. Use either the Standard fields or add Custom fields such as page_url, page_name, page_url or page_uuid that are part of the Unbounce Page data fields. If you do not map to a field in LeadByte we will not store them.
You have the ability to add Custom Fields, this should be used to add the SID (LeadByte Supplier ID and the Campaign ID). You can see this in the example below.
Example of field mapping
Unbounce custom end-point in LeadByte
Within your UnBounce Page you have a Tab called "Webhooks". This is where you will add the URL to post the Form Data and map your fields.
Step 1
Create a v1.2 REST API Key in LeadByte with the permission to CREATE a Lead. We advise that you create a key specifically for UnBounce. You create a REST API Key under Admin > Tech Hub > REST API.
Step 2
- Add the following URL to UnBounce and map the fields.
Be sure that you are using the correct LeadByte domain extension for your account i.e. co.uk or .com
- The first INSERT value is your account name.
- The second INSERT value is your LeadByte REST Key from Step 1.
- The third INSERT value is your Campaign Reference in LeadByte
Please ensure the fields are the same as per your LeadByte campaign else it will not work.
URL
https://INSERT.leadbyte.co.uk/restapi/v1.2/unbounce?key=INSERT&campid=INSERT
It's worth noting that the "preview page" function doesn't fire your webhook. So test this set-up on your published page to ensure it works.
Capturing SID as hidden field
This article covers the principles of how to track where your leads have come from i.e. Facebook, Google. For UnBounce, you can take your pick (option 1, 2 or 3). Below covers 2 and 3, which are the methods we recommend.
SID URL Parameter Tracking
This will require you to create SID as a hidden field (with a default value) and make sure your Ad links include the SID URL parameter. URL parameters also enable you to pass attribution data into every lead such as UTM parameters, FBCLID, GCLID, AdSet, AdName and more.
Why is this important? Capturing SID enables you to see where your leads have come from i.e. Facebook, Google. Capturing additional values such as Adset, AdName will enable you to track revenue back to the ads that you run. If you generate leads by working with Suppliers (affiliates, publishers) you should use SID to track performance.
Example URL structure:
Lets assume in LeadByte that the Supplier Facebook is SID 4. This would be an example of your URL in your Facebook Ads https://www.MyDomain.com/?sid=4&ssid=Ad1
How to capture hidden fields with UnBounce
Firstly, Read this article:
https://documentation.unbounce.com/hc/en-us/articles/360001198863-Passing-URL-Parameters-Through-a-Form
Tip:
When you add SID as Hidden Field, make sure that you enter in a default SID value. If the SID is dropped from the URL (it happens) then the default value will always be used (as a backup). Your LeadByte account automatically creates you (account owner) as a Supplier with the SID value of “1”. You would enter 1 into the Default value against the SID Hidden field in UnBounce.
Automatically capture the referrer (Facebook, Google)
This requires you to add JavaScript (example below) to your UnBounce page so please ensure you know what you are doing. Here are the Steps:
1. Create Suppliers in LeadByte (read more here)
2. Add hidden field to UnBounce (SID)
3. Map SID > SID in WebHook in UnBounce
4. Add Script to UnBounce (script to map referrer to SID)
5. TEST
Script
In the example below, if traffic comes from Google it is stored as SID "1".
If it comes from Facebook, it is "2" else it is "3"
<script>
var referrer = document.referrer;
document.getElementById('referrer').value = referrer;
console.log(referrer);
if (referrer.includes('google')) { //Google
var sid = 1;
document.getElementById('sid').value = sid;
}
else if (referrer.includes('facebook') || referrer.includes('instagram')) { //Facebook/Instagram
var sid = 2;
} else {
var sid = 3
document.getElementById('sid').value = sid;
}
console.log(sid);
</script>
Comments