Links
Comment on page

Custom Pardot Form

Below you'll find the steps to embed a custom Pardot form:
  1. 1.
    Add a new step and choose the "Lead Form" guide.
  2. 2.
    Click on the "Embed Custom Form" button underneath the Storylane Lead Form.
  3. 3.
    Choose "Custom" from the dropdown and copy-paste the code from Pardot.
  4. 4.
    Above the code you pasted from Pardot, you'll need to add the following code:
<script>
window.addEventListener("message", function (event) {
if (event.data && event.data.message === "PARDOT_FORM_SUCCESS") {
window.parent.postMessage({
message: 'storylane-lead-submit',
payload: {
lead: { email: event.data.email }
}
},'*');
};
});
</script>
  1. 5.
    In Pardot, under the "Thank you Code" tab from the "Completion Actions" section, you'll need to add the following code:
<script>
window.parent.postMessage(
{
message: "PARDOT_FORM_SUCCESS",
email: "{{Recipient.Email}}"
},
"*"
);
</script>
You are now ready to test the Pardot form you embeded. Feel free to contact [email protected] if you have any questions or need help with embedding a custom Pardot form.
Last modified 1mo ago