1 Reply Latest reply on Jun 29, 2018 8:48 PM by Sanford Whiteman

    Marketo Embedded Form in Unbouce - Way to trigger Unbounce conversion?

    Jason Keller

      Hey there,

       

      This is a bit of a unique issue - my team uses Unbounce and loves the A/B testing in there. But I am implementing Marketo embedded forms on those Unbounce pages (for a variety of reasons). But that means, when someone submits a form in Unbounce, the marketo form-submit doesn't show up as a conversion within the Unbounce page metrics.

       

      Has anyone tried a script to get the marketo form-submit trigger to emulate the Unbounce submit trigger that Unbounce natively counts? I'd love to be able to provide these metrics to our team within Unbounce while also not messing up my goal tracking in GA.

       

      Thanks for any thoughts!

       

      Reference: Setting Conversion Goals – Documentation

        • Re: Marketo Embedded Form in Unbouce - Way to trigger Unbounce conversion?
          Sanford Whiteman

          Yes, you can log the Unbounce form conversion by loading the UB endpoint as a tracking pixel. You can do this in the onSuccess of your Marketo form, before redirecting to the Marketo-specified Thank You page.

           

          MktoForms2.whenReady(function(form){
            form.onSuccess(function(vals,tyUrl){
              window._ubaq = window._ubaq || [];
              window._ubaq.push(["trackGoal", "convert"]);
          
              var ub_conversion_script = document.createElement("script");
              ub_conversion_script.type = "text/javascript";
              ub_conversion_script.onload = function(e){ document.location.href = tyUrl; };
              ub_conversion_script.src = "//d3pkntwtp2ukl5.cloudfront.net/uba.js";
              document.head.appendChild(ub_conversion_script);
          
              return false;
            });
          });
          

           

           

           

          Author's note: I happen to know more about Jason's setup than he provided here!