How to count Unbounce submissions as conversions in OrcLink. Tested against a copy of Unbounce's form markup and submit behaviour (app/api/capture/__tests__/fixtures/builders/unbounce.html, test app/api/capture/__tests__/tjs/builders.test.ts). Limits of that test: it is a copy of the markup and of the submit flow as documented, not the live builder; no Shadow DOM; the builder re-rendering the form is not modelled. Check your own page with the test tool.
Set up
Unbounce's submit button is a link. Unbounce's script checks the fields and then submits the form by script, which fires no submit event: form capture by selector cannot see it (the test shows it sends nothing). Use Unbounce's documented form hook and pass the email and phone your page has to orc.trackConversion:
- Add the OrcLink script under Javascripts > Placement: Head (all variants).
- Make sure form capture is on (Conversions > Install > 3. Forms; it also switches
orc.trackConversionon). Do not add a form selector for this page. - Add this under Javascripts > Placement: Before Body End Tag:
<script>
window.ub = window.ub || {};
window.ub.hooks = window.ub.hooks || {};
window.ub.hooks.beforeFormSubmit = window.ub.hooks.beforeFormSubmit || [];
window.ub.hooks.beforeFormSubmit.push(function () {
var f = document.querySelector('.lp-pom-form form');
if (!f || !window.orc) return;
var e = f.querySelector('input[type=email]'), p = f.querySelector('input[type=tel]');
window.orc.trackConversion({ kind: 'form', email: e ? e.value : '', phone: p ? p.value : '' });
});
</script>Notes
- If the form goes to a thank-you page, you may use a thank-you page rule INSTEAD of the snippet (never both: two ids, two conversions).
- The hook name
ub.hooks.beforeFormSubmitis from Unbounce's script documentation as remembered (unverified); check one submission in the test tool.
Check it
- Open Capture > Test tool in OrcLink and turn test mode on (or add
data-orc-testto the script tag on a test copy of the page). - Open the page from an OrcLink link (so the address has
?olid=), fill in the form and send it. - Within a few seconds the test tool shows one row: kind, the field NAMES read and hashed (email, phone), match "click id", outcome "Yes". It never shows values.
- Turn test mode off. Test outcomes are never sent to an ad platform.
Privacy
- With this snippet, YOUR code decides what is sent: it passes only the email and the phone field. The OrcLink script itself reads nothing from the form. The treatment and every other field stay in the page. The server hashes the email and phone on arrival and never stores them raw.
- Nothing is read or sent before the visitor gives advertising consent (when the workspace follows the consent manager). In HIPAA mode the same rules hold; hashes only.