Hi, Jessie:
I actually just wrote on this in another discussion post.
First Option: Fire the Conversion Code on the Submission of Landing page Form, not the Thank You PageYou can eliminate your own local conversions with some JavaScript, changing where the AdWords conversion code is fired. Instead of putting the conversion code onto the thank-you page, you can attach it to the form submit. Eric Hollebone wrote about it
here. On that page, you want to use the third method: using Marketo's pre-submit.
You can either put this code in the template or the individual landing pages under "Landing Page Actions > Edit Page Meta Tags." Then you can paste this code into the "Custom HEAD HTML:" section.
Depending on whether or not your template calls jQuery before, you might not need the first line of Javascript.
<script type="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript"> jQuery(document).ready(function($){
// bind to the form submit
$(&
#039;
#mktFrmSubmit&
#039;).submit(function(event) {
// test to see if at least one of the fields is filled in ...
// inject the google adword conversion code
var google_conversion_id=
... your google adwords id ...,
google_conversion_language="en",
google_conversion_format="3",
google_conversion_color="ffffff",
google_conversion_label='
... your google conversion label ...",
google_conversion_value=0;
$.getScript( "http://www.googleadservices.com/pagead/conversion.js" );
});
});
</script>
The commented "// test to see if at least one of the fields is filled in ..." is where you can add in simple validation to make sure the form is filled before counting it as an AdWords conversion. This can be as simple or detailed as you want.
This form still works (when replacing the appropriate fields) without field validation, but using the code without validation means that users hitting the "submit" button will be counted as conversions even if the form throws an error at them. So if you're using this without validation, just be wary of having a higher amount of AdWords conversions than actual leads in your database. Doing validation might be overkill, depending on your specific use!
Second Option: Pass a URL Parameter to the Thank-You Page, Only "Convert" When URL Parameter is PresentWhile this is one way to do it, I don't believe that it's the easiest. The first method that Eric mentioned on that page is to add a URL parameter to the landing page, and only fire the conversion code (on the landing page) when that URL parameter is there. This is easy when you're making the landing pages on your own, and not easy when you're using Marketo's native Design Studio functionality. BUT if you're interested in doing this, you can edit your individual form, changing the follow-up page for the form. Instead of doing a drop-down of the pages Marketo can detect, you can put the actual URL of the landing page with the added URL parameters.
The problem with doing this is that it takes out the dynamism ease, and adds one extra step to do whenever you make a new campaign.
Hope that's helpful!
Best Regards,
Edward Unthank
SEO/Web Specialist