If you’d like to embed Marketo forms on your ion experiences, check out this post to easily repurpose your Marketo embed code into a reusable ion widget. Taking these steps will enable you to redirect respondents to an ion page after form submission and to add ion rule logic to your Marketo forms.
Before we begin
The first step is to generate the embed code for the form from Marketo. The Marketo support document linked here outlines the steps to take. Your code will look like the example shared on Marketo's support site, also displayed below:
Let’s get started
Now that you have your Marketo embed code, let’s repurpose it into a reusable ion widget. There are three items you need to replace in the ion widget code. Let's use the MKTO script sample to help identify these three items.
1. YOUR SCRIPT SOURCE
The script source value in the MKTO example is:
2. THE DOMAIN OF YOUR SCRIPT SOURCE
The domain value in the MKTO example is:
3. YOUR MKTO ACCT ID
The ACCT ID value from the MKTO example is:
Update ion widget code
Now that you've identified the three items needed, update the placeholders in the ion widget code below with the appropriate values. No other modifications should be made to the ion widget code.
Add widget code to your ion library
In ion, navigate to Libraries > Widgets and click on the green plus sign to add a new widget. We recommend labeling the widget something like Embed Form and storing it in a category called Marketo. Paste the widget code above into the editor with the proper values for script source, domain of script source and account id.
Before saving, go ahead and set the form id as required text and nextPage as a required action, like the example below:
Add the widget to your ion experience
Navigate into the page where you'd like to embed the Marketo form. Drag the widget icon from the Basics palette onto your page and select your new Marketo > Embed Form widget. Next, under Variables in creative studio, enter the form id from your Marketo embed code and select the ion page you seek to redirect to.
Voila! Your Marketo form is now embedded on your ion experience! You can even add ion rule logic to your Marketo form. For example, rules can be used to mark as converted, tag or conditionally redirect respondents.
Funnel Dialogue Data into Marketo
If you’re garnering valuable information prior to form submission, these data points can be funneled into your Marketo form widget with a bit of customization. You’ll need to add hidden fields to your Marketo form to receive these data points. Your Marketo embed widget will be updated to save these ion data points into the corresponding Marketo form fields. Please reach out to email@example.com for assistance with this step.