SOLVED

How to populate a form on another website in a smart campaign

Go to solution
ManahilSami
Level 1

How to populate a form on another website in a smart campaign

I created an email program and am developing a smart campaign to measure success. If the reader click on the link and fill out a form before 11th October it will be moved to influenced member status.

I am not sure how to give the fills out form criteria as the form is on another website and how can I ensure forms filling before 11th october.

 

Your help will be appreciated.

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jo_Pitts1
Level 10 - Community Advisor

Re: How to populate a form on another website in a smart campaign

@ManahilSami 

you're question is a bit confusing.  There are three potential questions I think you MAY be asking here:

How to embed a Marketo form on a non Marketo page

Are you asking how to embed a Marketo form on a non Marketo page?

If so, embedding a form on any page is pretty easy

Jo_Pitts1_0-1633380204168.png

Jo_Pitts1_1-1633380285784.png

  1. Click Here
  2. Click Here
  3. Copy the embed code and place it on your page.

This won't support prefill, so you probably want to then look at this more complex, but brilliant approach by the legend that is @SanfordWhiteman : https://blog.teknkl.com/pre-fill-any-site-any-form/

 

Form based Smart Campaign triggers and filters

If you're asking how to tell if a marketo form has been filled out - it is irrelevant as to which site the Marketo form is on.. the standard triggers and filters will work just fine.

Jo_Pitts1_2-1633380441394.png

Jo_Pitts1_3-1633380477415.png

 

How to capture data from a NON Marketo form

If you're not using a Marketo form to capture the data you need a slightly different approach.

In that instance, the approach is to load the Marketo form in a hidden div.

On the submit of your visible form, you need to populate all the fields on the Marketo form, and then trigger a submit of the Marketo form.

If you need more detail on this, let me know.

 

Finally

You may be asking a totally different question, in which case can you elaborate a bit further please.

 

Cheers

Jo

 

 

View solution in original post

9 REPLIES 9
Jo_Pitts1
Level 10 - Community Advisor

Re: How to populate a form on another website in a smart campaign

@ManahilSami 

you're question is a bit confusing.  There are three potential questions I think you MAY be asking here:

How to embed a Marketo form on a non Marketo page

Are you asking how to embed a Marketo form on a non Marketo page?

If so, embedding a form on any page is pretty easy

Jo_Pitts1_0-1633380204168.png

Jo_Pitts1_1-1633380285784.png

  1. Click Here
  2. Click Here
  3. Copy the embed code and place it on your page.

This won't support prefill, so you probably want to then look at this more complex, but brilliant approach by the legend that is @SanfordWhiteman : https://blog.teknkl.com/pre-fill-any-site-any-form/

 

Form based Smart Campaign triggers and filters

If you're asking how to tell if a marketo form has been filled out - it is irrelevant as to which site the Marketo form is on.. the standard triggers and filters will work just fine.

Jo_Pitts1_2-1633380441394.png

Jo_Pitts1_3-1633380477415.png

 

How to capture data from a NON Marketo form

If you're not using a Marketo form to capture the data you need a slightly different approach.

In that instance, the approach is to load the Marketo form in a hidden div.

On the submit of your visible form, you need to populate all the fields on the Marketo form, and then trigger a submit of the Marketo form.

If you need more detail on this, let me know.

 

Finally

You may be asking a totally different question, in which case can you elaborate a bit further please.

 

Cheers

Jo

 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: How to populate a form on another website in a smart campaign


In that instance, the approach is to load the Marketo form in a hidden div.

 


No need for a hidden div, just hide the form element directly.
<form hidden id="mktoForm_123"></form>

 

Or don’t include the form element at all, though that can be confusing to decipher later.

Jo_Pitts1
Level 10 - Community Advisor

Re: How to populate a form on another website in a smart campaign

True enough 🙂

 

Jo_Pitts1
Level 10 - Community Advisor

Re: How to populate a form on another website in a smart campaign

@ManahilSami ,

I thought of a fourth option you might be asking about:

 

Munchkin Tracking

Are you wanting to track the fact they've been to a certain page on your site (i.e. a thank you page).  In that case, make sure munchkin is deployed on the site, and use either a triggered campaign, or a batch campaign run on a schedule using the web page options to set your influenced status:

either

Jo_Pitts1_0-1633407594617.png

or

Jo_Pitts1_1-1633407626045.png

Cheers

Jo

 

ManahilSami
Level 1

Re: How to populate a form on another website in a smart campaign

Hellom

 

Thanks a lot for the detailed response and my question is this How to capture data from a NON Marketo form. And yes I need more details here as I don't know how to do this.
Thanks a lot

 

Manahil

Jo_Pitts1
Level 10 - Community Advisor

Re: How to populate a form on another website in a smart campaign

@ManahilSami ,

from my original post:

How to capture data from a NON Marketo form

If you're not using a Marketo form to capture the data you need a slightly different approach.

In that instance, the approach is to load the Marketo form in a hidden div.

On the submit of your visible form, you need to populate all the fields on the Marketo form, and then trigger a submit of the Marketo form.

 

Now, in terms of what does that mean for you - well, it depends on what you're using to build your form currently.. however, the fundamental logic remains the same.

 

Load a hidden instance of the Marketo form that you want to drive your program from.  

<script src="https://your-mkto.domain.com/js/forms2/js/forms2.min.js"></script>

<form hidden id="mktoForm_606"></form>
<script>MktoForms2.loadForm("https://your-mkto.domain.com", "YUR-INS-TNC", 606);</script>


Attach a Javascript event to the submit of your visible form (can't comment to much on that without knowing the form tech you are using)

 

In that event, grab all the data from the visible form fields and place into the Marketo form with some code along these lines:

form.vals({
  "FirstName": $('#first').val(),
  "LastName": $('#last').val(),
  "Email": $('#email').val(),
  "Phone": $('#phone').val(),
  "metlifecompetitiondatas2": $('#mlcd2').val(),
  "optInMetlifecare": $('#customRadio1').is(':checked')
});
form.submit();

 

You may also want an event on the success of the form submit to make sure weird page refreshes and redirections don't occur

MktoForms2.whenReady(function(form) {
  form.onSuccess(function(vals, thankYouURL) {
    return false;
  });
});

 

If you're not  a coder, you may need/want to engage someone who can help you in the nuts and bolts of it all.  Remember, the code I've provided here is just sample snippets, not a fully worked solution.

 

Cheers

Jo

SanfordWhiteman
Level 10 - Community Moderator

Re: How to populate a form on another website in a smart campaign

Is it an embedded Marketo form on another website?

SanfordWhiteman
Level 10 - Community Moderator

Re: How to populate a form on another website in a smart campaign

@ManahilSami please return to check responses in your thread.

Jo_Pitts1
Level 10 - Community Advisor

Re: How to populate a form on another website in a smart campaign

@SanfordWhiteman , if they come back they come back... if not.. well, I've maybe contributed to the greater good 🙂