Unbounce can be a useful tool for marketers to easily create landing pages and web forms. 

To connect Attribution & Unbounce you'll have to add a custom script in the script manager of Unbounce. 

To connect Unbounce and Attribution follow the steps below:

Go to Unbounce.com 

Go to Settings -> Script Manager -> Add a Script

Choose a 'custom script' 

Choose header as the placement. 

You should place the code below AFTER the Attribution tracking snippet that is installed on your pages.

If you are using Segment or Wordpress this tracking snippet may already be installed in which case you'd only need to add the snippet below. More on the tracking snippet here.

<script type="text/javascript">
!function() {
var callback = function(event) {
var engine = (window.Attribution || window.analytics);
var traits = {};
var inputs = event.formElement.elements; for (i = 0; i < inputs.length; i++) {
var name = inputs[i].name;
var value = inputs[i].value; if ( // skip empty or reserved inputs
name.match(/^(page|ub)/) ||
name == '' ||
name == undefined ||
value == '' ||
value == undefined
) {
continue;
} traits[name] = value;
} if (engine) {
engine.identify(traits);
engine.track('Unbounce Form Submitted', {
unbounce_page: ub.page.name,
unbounce_variant: ub.page.variantId
});
} else {
console.log('[Attribution] Snippet not found');
}
}; if (window.ub && window.ub.hooks) {
window.ub.hooks.beforeFormSubmit.push(callback);
} else {
console.log('[Attribution] Unounce page not detected');
}
}();
</script>

Make sure you are applying this snippet to your desired domains!

Then save and publish the snippet.

Once this is complete the Attribution tracking snippet, identify(), and attribution.track calls will be automatically added to all your forms. 

Please feel free to reach out if you have any questions on this! 

Did this answer your question?