Where to place utm's in form embed code? | Community
Skip to main content
James_Zolinski
New Participant
September 26, 2018
Solved

Where to place utm's in form embed code?

  • September 26, 2018
  • 3 replies
  • 11222 views

We are using Marketo contact forms embedded on our website with hidden utm parameters. When people fill out the contact forms we receive an alert email for sales to follow up with them. The problem is, the Lead Source and Source Detail fields are blank on our alert emails. I noticed the embedded form code does not have the utm's in it, in order for embedded forms to track Lead Source and Source data, do the utm's need to be placed in the embedded code? If so, where in the embedded code would it go?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Grégoire_Miche2

Thanks Jason. Sorry for all the questions regarding utm’s and embedded forms. I’ve inherited this Marketo instance and am coming across things like this that need to be fixed.

Basically, this form is not in any programs or SC, but according to Sanford that should not be a problem. The form was basically created just to be embedded on our site. An example of a value I would expect to see for Lead Source would be “Website” and Source Detail would be “Organic”. Since this form, I believe, was created specifically to be used as a contact form on our website, I think entering a default value for these fields would solve our problem, that is as long as this form is only being used on our website.

Although your other option of a SC with “Fills out form” would be just as useful. I’m trying to better understand the best ways for embedded forms to be tracked in the future to avoid these types of issues.

My initial question of where to place utm’s, comes from the idea that if the utm’s are not part of the form embed code on the website, the fields would not populate, example



My thought process is that by including the utm’s in the form embed code, when the form is submitted, it would caputre the lead source and source detail. But now I am thinking that is wrong based on what I have read.

Thanks for all the help and advice!


Hi James,

you ou do not technically need a program to handlr that form, but the best practice is that you at least host the SC in a program, so that each person filling out the form would become a progrMa member and get the program as acquisition program when they are a new lead. This will preserve your reporting capabilities.there is also a virtue to handling things always through programs: consistency reduces the risks of errors.

the form itself canbe hosted in the same program or shared I the design studio. The lattter is better if the form is to be reused. And you never know in advance if you might need to reuse a form in the future.

Greg

3 replies

Avtar_Singh1
New Participant
September 27, 2018

Hi James,

Autofill field value from URL parameters option works on both Marketo and Non-Marketo landing pages(i.e Wordpress).  However, this configuration only works if the user lands directly on contact us Wordpress page and fills out Marketo form.  If the user goes on another page after landing on Contact Us and comes back to contact us page and fills out Marketo form then UTM fields will not have any value(Missing URL parameters). To capture this behavior you need to set cookies with URL parameters values and use Auto fill option with cookie.

If this configuration is set up correctly then there is no need to set up any Smart Campaign to get UTM fields values into the lead.  Please observe if you want these UTM fields values into other fields(i.e Lead Source) then it requires SmartCampaignn setup.

Best Regards,

Avtar Singh

New Participant
September 28, 2018

Adding onto the SC setup from Avtar for Lead Source if you go this route vs adding hidden form fields for these, this is handled at the program level- My Tokens tab, create Lead Source and Lead Source Detail tokens, {{my.LS}} {{my.LSD}} and their corresponding values you want to track for each.  In the form trigger SC workflow drag in Change Data Value filters for your Lead Source and Lead Source Detail field attributes and use the tokens you created and those token values will be recorded on the lead record that's submitted the form.  

Jason_Keller3
New Participant
September 27, 2018

James it sounds like you are trying to reference a UTM field on the lead record instead of capturing the UTM from the URL. If this is the case then yes you won't have those fields on the form populate on a WP page (if this is indeed the case, then I know a guy that may have a solution for you.... https://blog.teknkl.com/pre-fill-any-site-any-form/  Thanks Sanford!)

If that isn't the case, then the hidden UTM fields should capture your UTMs regardless of where they are embedded.

Third scenario - you are assigning a unique lead source/detail value for each embedded form on your WP pages. If that is the case then you could have a hidden field with an assigned default value that could be populated to a lead source/detail field.

Hopefully one of those is useful!

James_Zolinski
New Participant
September 27, 2018

Thanks Jason,

I tried replying to the post on the community, but don’t see the option to do so.

I think the problem is, as you can see in the pic below, when I hover over the “contact me” button on our website, the url associated to the button does not contain any of the utm’s to reference to the hidden utm’s that are on the form. Could this be the problem. If so, then the solution would be to update the url for the “contact me” button to include the utm’s for Lead Source and Source Detail, correct? And then these fields on our alert emails should populate?

James Zolinski

Marketing Operations Manager

Direct: 602-601-5833

Email: james@helpinc.us<mailto:james@helpinc.us>

Web: www.helpinc.us<http://www.helpinc.us/>

Jason_Keller3
New Participant
September 27, 2018

So because the form is on an iframe, this conversation thread might be relevant: Passing UTM values to iframe embedded forms

One thing that could help clarify things is that utms are typically being populated into hidden fields from URL. But, things like lead source and lead source detail can also be populated in different ways. It might be worth backing up a step and to ask what is an example value that you would expect to see in the lead source field? If you just want to see "Website" in the lead source field, you may want to bypass any URL augmentations and just use a unique form on that page that has "website" pre-filled in a hidden lead source field.

Or, you could also populate that as part of the smart campaign where trigger = fills out form (to this specific form and then part of the flow step include "if lead source is empty -> populate lead source with "website"). 

Hopefully that helps - but yeah it is still hard to answer because there are a couple layers to address (the iframe situation, where the utms are coming from, etc.)

SanfordWhiteman
New Participant
September 26, 2018

You don't have to do anything special to track UTMs with the embed code vs. the same form on a Marketo LP.

If the hidden fields are set to AutoFill from the URL, this works equally well for both the embed and a named mktoForm element. Of course just filling from the current URL isn't a full-circle solution, but it works the same way in both cases.

James_Zolinski
New Participant
September 26, 2018

Thanks Sanford, well, the page it is embedded is not a Marketo LP, it is a Wordpress page. Since this is hosted on a Wordpress page, would the autofill still work. I do see autofill is enabled on the form.

SanfordWhiteman
New Participant
September 26, 2018

Yes, like I said, AutoFill works the same for both cases.