Legacy: Implement Identify Calls with Marketo Forms
Last Updated: November 8, 2022
🔍 Please note: this article is for customers on Standard Bundle, Enrichment, or Clearbit Platform plans.
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
- Install the Clearbit Tag.
- 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.
- Once you approve your form, click on Embed Code from the Form Actions menu and copy the code.A 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> - 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!
Articles in this section
- Legacy: Getting Started with Clearbit Forms for Marketo
- Legacy: Set Up Clearbit Forms for Marketo
- Legacy: Set Up Clearbit Enrichment for Marketo Forms
- Legacy: Implement Identify Calls with Marketo Forms
- Legacy: Why are my Marketo forms being submitted with empty field values?
- Prevent Marketo form fields from being hidden if Clearbit’s JavaScript does not load (using Reveal)
- Legacy: Prevent Marketo forms field from being hidden if Clearbit JS doesn't load (No Reveal)
- Legacy: Clearbit Forms for Marketo FAQ
- Legacy: Advanced Use of Marketo Forms Code
- Legacy: Troubleshoot Legacy Clearbit Forms for Marketo