Implement Identify Calls with Marketo Forms

Working with Marketo forms? You can take advantage of the form embed code to make your identify call to Clearbit X without having to rely on a developer.

As a reminder, an identify call allows you to get a clear picture of the person behind the anonymous IP address visiting your website. Tracking Form submissions is essential to understand your customer’s journey and Conversion Rate Optimization (CRO). You can find a more detailed explanation of identify calls here

💡 Please note: You'll first need to setup the Clearbit tag before continuing. If you haven't yet, here is where you can start!

  1. Let's start with a simple Marketo form that includes a First Name, Last Name, and Email field. It should look like this:marketo-identifycall-1.png
  2. Once you approve your form, click on Embed Code from the Form Actions menu and copy the code.marketo-identifycall-2.pngA standard Marketo form embed code looks like this:
    <script src="YOUR-SCRIPT-URL-HERE"></script>
    <form id="YOUR-FORM-ID-HERE"></form>
    <script>MktoForms2.loadForm("YOUR-BASE-URL-HERE", "YOUR-MUNCHKIN-ID-HERE", YOUR-FORM-ID-HERE);</script>
  3. We'll use Marketo's onSubmit form callback from their API Reference to modify this code and do the following:
    • Fetch all form values.
    • Grab the email field's value (i.e. the email submitted by the person viewing your website).
    • Send the identified person to Clearbit.
      function (form) {
      form.onSubmit(function () {
      // Fetch all form values
      let formValues = form.getValues();
      // Grab the email field's value
      let submittedEmail = formValues.Email;
      // Send the identified user to Clearbit
      clearbit.identify(submittedEmail, {
      email: submittedEmail,
      });
      });
      }

The new embed code should look like this:

<script src="YOUR-SCRIPT-URL-HERE"></script>
<form id="YOUR-FORM-ID-HERE"></form>
<script>
MktoForms2.loadForm("YOUR-BASE-URL-HERE", "YOUR-MUNCHKIN-ID-HERE", YOUR-FORM-ID-HERE,
function (form) {
form.onSubmit(function () {
// Fetch all form values
let formValues = form.getValues();
// Grab the email field's value
let submittedEmail = formValues.Email;
// Send the identified user to Clearbit
clearbit.identify(submittedEmail, {
email: submittedEmail,
});
});
}
);
</script>

Now, when your website visitors submit your Marketo forms, you'll be able to identify what pages they have been visiting through Clearbit!