{"id":3198,"date":"2021-08-11T14:14:07","date_gmt":"2021-08-11T14:14:07","guid":{"rendered":"https:\/\/obo.zoj.mybluehost.me\/uncategorized\/marketo-embed-mkto-forms-in-ion\/"},"modified":"2026-01-13T18:51:12","modified_gmt":"2026-01-13T18:51:12","slug":"marketo-embed-mkto-forms-in-ion","status":"publish","type":"post","link":"https:\/\/ioninteractive.com\/ionacademy\/marketo-embed-mkto-forms-in-ion\/","title":{"rendered":"Marketo: Embed MKTO forms in Ion"},"content":{"rendered":"\n<p class=\"\">If you\u2019d 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.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"#before\" rel=\"noopener\"><strong>Before we begin<\/strong><\/a><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"#started\" rel=\"noopener\"><strong>Let\u2019s get started<\/strong><\/a><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"#update\" rel=\"noopener\"><strong>Update Ion widget code<\/strong><\/a><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"#library\" rel=\"noopener\"><strong>Add widget code to your Ion library<\/strong><\/a><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"#experience\" rel=\"noopener\"><strong>Add the widget to your ion experience<\/strong><\/a><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"#funnel\" rel=\"noopener\"><strong>Funnel Dialogue Data into Marketo<\/strong><\/a><\/h4>\n\n\n\n<p class=\"\">If you\u2019d 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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Before we begin<\/strong><\/h3>\n\n\n\n<p class=\"\">The first step is to generate the embed code for the form from Marketo. The Marketo support document\u00a0<a href=\"http:\/\/docs.marketo.com\/display\/public\/DOCS\/Embed+a+Form+on+Your+Website\" target=\"_blank\" rel=\"noopener\">linked here\u00a0<\/a>outlines the steps to take. Your code will look like the example shared on Marketo&#8217;s support site, also displayed below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"590\" height=\"382\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2021\/08\/image-2.png\" alt=\"\" class=\"wp-image-8627\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2021\/08\/image-2.png 590w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2021\/08\/image-2-300x194.png 300w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p class=\"\"><a id=\"started\" data-hs-anchor=\"true\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Let\u2019s get started<\/strong><\/h3>\n\n\n\n<p class=\"\">Now that you have your Marketo embed code, let\u2019s repurpose it into a reusable Ion widget. There are three items you need to replace in the ion widget code. Let&#8217;s use the MKTO script sample to help identify these three items.<\/p>\n\n\n\n<p class=\"\"><strong>1. YOUR SCRIPT SOURCE<\/strong><\/p>\n\n\n\n<p class=\"\">The script source value in the MKTO example is:<\/p>\n\n\n\n<div class=\"hs-table-align-center\" style=\"max-width: 100%; width: 100%;\" data-hs-responsive-table=\"true\">\n<table class=\"hs-table-align-center\" style=\"width: 100%; margin-left: auto; margin-right: auto; border-collapse: collapse; border: 1px solid #99acc2;\">\n<tbody>\n<tr>\n<td style=\"width: 100%; padding: 4px; border: 1px solid #99acc2;\">\/\/app-sjint.marketo.com\/js\/forms2\/js\/forms2.js<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n\n\n\n<p class=\"\"><strong>2. THE DOMAIN OF YOUR SCRIPT SOURCE<\/strong><\/p>\n\n\n\n<p class=\"\">The domain value in the MKTO example is:<\/p>\n\n\n\n<div class=\"hs-table-align-center\" style=\"max-width: 100%; width: 100%;\" data-hs-responsive-table=\"true\">\n<table style=\"width: 100%; border-collapse: collapse; border: 1px solid #99acc2;\">\n<tbody>\n<tr>\n<td style=\"width: 100%; padding: 4px; border: 1px solid #99acc2;\">\/\/app-sjint.marketo.com<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n\n\n\n<p class=\"\"><strong>3. YOUR MKTO ACCT ID<\/strong><\/p>\n\n\n\n<p class=\"\">The ACCT ID value from the MKTO example is:<\/p>\n\n\n\n<div class=\"hs-table-align-center\" style=\"max-width: 100%; width: 100%;\" data-hs-responsive-table=\"true\">\n<table style=\"width: 100%; border-collapse: collapse; border: 1px solid #99acc2;\">\n<tbody>\n<tr>\n<td style=\"width: 100%; padding: 4px; border: 1px solid #99acc2;\">\n<pre data-aura-rendered-by=\"75:2295;a\">162-LBR-557<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Update Ion widget code<\/strong><\/h4>\n\n\n\n<p class=\"\">Now that you&#8217;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.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;script src=\"<strong>YOUR SCRIPT SOURCE (#1)<\/strong>\"&gt;&lt;\/script&gt;\n\n&lt;div id=\"mktoFormWrapper\"&gt;&lt;\/div&gt;\n\n&lt;script type=\"text\/javascript\"&gt;&nbsp;\n\n(function (runtime) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var mktoFormID = \"##formID\";\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var mktoFormElm = document.createElement('form');\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mktoFormElm.setAttribute(\"id\", \"mktoForm_\" + mktoFormID);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var formPosition = document.getElementById('mktoFormWrapper');\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; formPosition.appendChild(mktoFormElm);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MktoForms2.loadForm(\"<strong>THE DOMAIN OF YOUR SCRIPT SOURCE (#2)\", \"YOUR MKTO ACCT ID (#3)<\/strong>\", mktoFormID, function(form) {\n\n\/\/onSuccess handler\n\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;form.onSuccess(function(values, followUpUrl) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ override followUpUrl if another URL is set in ion\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var thankYouPageURL = \"##thankyou_url\";\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return true;\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\n\n})(ixp.runtime);\n\n&lt;\/script&gt;<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Add widget code to your Ion library<\/strong><\/h4>\n\n\n\n<p class=\"\">In Ion, navigate to Libraries &gt; 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.<\/p>\n\n\n\n<p class=\"\">Before saving, go ahead and set the form id as required text and Next Page as a required action, like the example below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"675\" height=\"143\" loading=\"lazy\" src=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2021\/08\/image-3.png\" alt=\"\" class=\"wp-image-8629\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2021\/08\/image-3.png 675w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2021\/08\/image-3-300x64.png 300w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/figure>\n\n\n\n<p class=\"\"><br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Add the widget to your ion experience<\/strong><\/h4>\n\n\n\n<p class=\"\">Navigate into the page where you&#8217;d like to embed the Marketo form. Drag the widget icon from the Basics palette onto your page and select your new Marketo &gt; 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.<\/p>\n\n\n\n<p class=\"\">Voila! Your Marketo form is now embedded in 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.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Funnel Dialogue Data into Marketo<\/strong><\/h4>\n\n\n\n<p class=\"\">If you\u2019re garnering valuable information prior to form submission, these data points can be funneled into your Marketo form widget with a bit of customization. You\u2019ll 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.<\/p>\n\n\n\n<p class=\"\">Please reach out to our Support Team for assistance with this last step if needed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019d 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 [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":6076,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[2175,2078],"tags":[2173,2200,2208,2218],"class_list":["post-3198","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ion-integrations-the-advanced-capabilites","category-the-advanced-capabilites","tag-advanced","tag-data-management","tag-ion-integration","tag-marketo"],"_links":{"self":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts\/3198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/comments?post=3198"}],"version-history":[{"count":4,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts\/3198\/revisions"}],"predecessor-version":[{"id":8630,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts\/3198\/revisions\/8630"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/media\/6076"}],"wp:attachment":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/media?parent=3198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/categories?post=3198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/tags?post=3198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}