Implement Identify Calls with Marketo Forms

Last Updated: November 8, 2022

For pricing information, please fill out the demo-request form on our pricing page to get in touch with a sales representative.

Working with Marketo forms? You can take advantage of the form embed code to make identify calls to Clearbit 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. 

Set Up Identify Calls with Marketo Forms

  1. Install the Clearbit Tag.
  2. Create a form within Marketo. For this example, we'll create a simple form with only First Name, Last Name, and Email fields. Click Submit.marketo-identifycall-1.png
  3. 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>
  4. 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 identify call to Clearbit with the email field value.
      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!