26 Replies Latest reply on Sep 28, 2018 3:17 PM by Trinity Levenson

    Where to place utm's in form embed code?

    James Zolinski

      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?

        • Re: Where to place utm's in form embed code?
          Sanford Whiteman

          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.

          1 of 1 people found this helpful
          • Re: Where to place utm's in form embed code?
            Jason Keller

            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!

              • Re: Where to place utm's in form embed code?
                James Zolinski

                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/>

                 

                 

                  • Re: Where to place utm's in form embed code?
                    Jason Keller

                    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.)

                      • Re: Where to place utm's in form embed code?
                        James Zolinski

                        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!

                          • Re: Where to place utm's in form embed code?
                            Grégoire Michel

                            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

                            1 of 1 people found this helpful
                            • Re: Where to place utm's in form embed code?
                              Sanford Whiteman

                              You still haven't explained how your concern about fields not being captured is relevant here. You do not need an SC to capture submitted values, period.

                                • Re: Where to place utm's in form embed code?
                                  James Zolinski

                                  My concern is that when leads fill out embedded forms on non-Marketo LP's, there is no acquisition program or source associated to identify where they came from, without having to look at each leads activity log to know where they came from. We have a number of forms that are being used that have hidden utm fields but the fields on the forms are not populating correctly, so we're unable to associate leads to specific AP's to know which AP's are more successful than others. As previously mentioned, I inherited this instance and am finding these issues from previous users, and I don't think they did enough tracking of programs successes to realize the forms were not tracking leads AP's, sources correctly. And as I gain a better understanding of Marketo I want to learn how to avoid these issues in the future so leads and their AP's are being tracked correctly. 

                                    • Re: Where to place utm's in form embed code?
                                      Sanford Whiteman

                                      "the fields on the form are not populating correctly" -- fields on embedded forms populate in the same way they are configured. So I still  don't know what you mean by "correctly." The correctness is relative to the setup in Form Editor!

                                        • Re: Where to place utm's in form embed code?
                                          James Zolinski

                                          Sorry Sanford, perhaps I am using the wrong terminology when it comes to describing my problem. Below is a screenshot of one of the alert emails we receive from Marketo when a new leads fills out the embedded contact me form on our website. As you can see, the Lead Source and Source Detail field are empty, even though on the form we are using the hidden utm fields to capture this information, which unfortunately is not happening. Which is why I was thinking that since the form's embedded code does not contain the utms, the form is not being populated correctly with the Lead Source and Source Detail. I believe this is been going on for at least a year because we have about 5200 leads with no AP's associated to them. Seeing this, does it help explain or make more sense of what I am trying to resolve? I really want to get this resolved so we can start tracking these leads better.

                                           

                                          utm.JPG

                                            • Re: Where to place utm's in form embed code?
                                              Sanford Whiteman

                                              perhaps I am using the wrong terminology when it comes to describing my problem

                                              I think that's true... the very title of this thread isn't clear in Marketo-speak. The form embed code consists of two script tags, one remote JS file and one block of local JS.  So when you say, "Where to place such-and-such in form embed code?" that suggests (perhaps) that you mean "How do I add custom form behaviors JavaScript within the local JS block?" or something along those lines. Definitely not that you're talking about how to set up the form in Form Editor, which is sort of the opposite of the embed code, since the Form Editor's UI-driven configuration is for both Marketo LPs with no embed code at all and embedded forms on 3rd-party pages.

                                               

                                              So let's take it back to the beginning:

                                              • You're seeing that Lead Source and Source Detail, embedded via {{lead.}} tokens, are not populating in your alert emails.
                                              • Those {{lead.}} tokens correspond to fields you believe you are filling using the Hidden field feature in Form Editor.
                                              • In an earlier screenshot you showed that when utm_source was present in the URL, you were mapping that to the lead field "UTM Source LT".
                                              • We have no idea if you're including a token for that field "UTM Source LT" in your alert emails, after the words "Lead Source." You could well be including another field, and that field could be blank. We couldn't possibly know without more information.
                                              • You haven't provided a test URL that includes the (non-empty) url parameter utm_source and which hosts a form.
                                              • You haven't shown the Detail popup for a Filled Out Form Activity Log entry corresponding to a form fillout on that test URL. The Detail always shows exactly what was posted from the browser to Marketo, even if it doesn't end up populating a lead field.
                                              1 of 1 people found this helpful
                                                • Re: Where to place utm's in form embed code?
                                                  James Zolinski

                                                  Please see my answers in below. I must apologize, I misspoke when I said this form was not in a program, it actually is, along with the alert emails, which I think might make this easier to remedy, but I could be wrong, much like it seems I have about trying to resolve this.

                                                  So let's take it back to the beginning:

                                                  • You're seeing that Lead Source and Source Detail, embedded via {{lead.}} tokens, are not populating in your alert emails. Correct, please see email screenshot.

                                                  token.JPG

                                                  • Those {{lead.}} tokens correspond to fields you believe you are filling using the Hidden field feature in Form Editor. Yes, please see form screenshot.

                                                  utm.JPG

                                                  • In an earlier screenshot you showed that when utm_source was present in the URL, you were mapping that to the lead field "UTM Source LT". Yes, I have seen this work on other forms and leads when utm’s are present in urls. The url for the “Contact Me” button only has “www.companyname.com/#”, not sure why the #. I was thinking if I included utm’s on this url, “www.companyname.com/utm_medium=website&utm_source=organic", this would populate the fields on the alert email. Yes/No
                                                  • We have no idea if you're including a token for that field "UTM Source LT" in your alert emails, after the words "Lead Source." You could well be including another field, and that field could be blank. We couldn't possibly know without more information. Is this the same as the 1st screenshot, if not, what additional information do you need?
                                                  • You haven't provided a test URL that includes the (non-empty) url parameter utm_source and which hosts a form. What is a test url?
                                                  • You haven't shown the Detail popup for a Filled Out Form Activity Log entry corresponding to a form fillout on that test URL. The Detail always shows exactly what was posted from the browser to Marketo, even if it doesn't end up populating a lead field. Please see screenshot below

                                                  activity log.JPG

                                                   

                                                  I truly appreciate all the help on this matter, please don't hesitate to let me know if I need to provide additional information to resolve this finally. Also, below are screenshots of the Smart list and flow from the SC for this program where the alert emails are generated from, in case this helps.

                                                  smart list.JPG

                                                  flow.JPG

                                                   

                                                   

                                                    • Re: Where to place utm's in form embed code?
                                                      Sanford Whiteman
                                                      • Those {{lead.}} tokens correspond to fields you believe you are filling using the Hidden field feature in Form Editor. Yes, please see form screenshot.utm.JPG

                                                       

                                                       

                                                      Nothing in this screenshot proves you're using the Lead Source and Lead Source Detail fields on this form. You're mapping the query param utm_source to a field called UTM Source LT. Unless you changed the name, that isn't the default Lead Source/Person Source field.

                                                       

                                                      • You haven't provided a test URL that includes the (non-empty) url parameter utm_source and which hosts a form.

                                                      What is a test url?

                                                      Test URL: a URL that someone can navigate to to view your form, and the same URL you're using in your repeated internal tests.

                                                       

                                                      • You haven't shown the Detail popup for a Filled Out Form Activity Log entry corresponding to a form fillout on that test URL. The Detail always shows exactly what was posted from the browser to Marketo, even if it doesn't end up populating a lead field.

                                                      Please see screenshot below

                                                       

                                                       

                                                      The Detail popup is what you see when you click the Filled Out Form activity. You're showing the general Activity Log summary screen, not a Detail. The fact that you haven't found the Detail suggests this hasn't been debugged at all, really!

                                                        • Re: Where to place utm's in form embed code?
                                                          James Zolinski

                                                          Thank you Sanford for looking at this. Am I missing something or am I just not getting this. I understand now, I think, what the problems are, but each time I think I have a solution it ends up not being correct.

                                                          No, I have not changed anything in terms of query param's on this form, but if I understand what you are saying, is the Lead Source and Source Detail are not populating on the alert email due to mismatching fields on the form and I need to change the utm_Source LT to utm_Lead Source and do the same for the Source Detail. Or even need to add a hidden query param of Lead_Source_Detail.

                                                           

                                                          The test url is: app-sj20.marketo.com/m#FOP1720

                                                           

                                                          Detail pop-up:

                                                          detail.JPG

                                                           

                                                          I do see the query param's on this are missing, which I might ascertain as being the problem. If this is one of the problems, then I have this same problem with other forms with other incorrect query param's or just completely empty query param's.

                                                            • Re: Where to place utm's in form embed code?
                                                              Sanford Whiteman

                                                              You're not organizing and controlling your test environment. This is not going to help.

                                                               

                                                              The Filled Out Form activity in this screenshot is from a URL that didn't have any UTM parameters in the query string.  Hence it doesn't matter what fields you're mapping the params to: you will never get any new values posted in this scenario.

                                                               

                                                              Beyond that, you don't have the Lead Source and Lead Source Detail as hidden fields on the form. You have other fields on the form! So your intended fields will not be populated from a form post, even if the page has UTM parameters in the query string.

                                                                • Re: Where to place utm's in form embed code?
                                                                  James Zolinski

                                                                  Well, as I have mentioned previously, this was all done prior to me and this is what I have walked in to and now need to fix. Me, I would never pushed something live without testing it.

                                                                  So how do I fix this. Based on your assessment I need to:

                                                                  Add the query string to the url

                                                                  Add Lead Source and Lead Source Detail as hidden fields on the form

                                                                   

                                                                  Will implementing these 2 changes get me closer to resolving our alert email fields not populating correctly?

                                                                    • Re: Where to place utm's in form embed code?
                                                                      Sanford Whiteman

                                                                      Add the query string to the url

                                                                      Your form is config'd to read values from the current query string into hidden fields. So, yes: you must have not only a query string in general but specifically a query string with parameter names matching the params in your form configuration.

                                                                       

                                                                      Add Lead Source and Lead Source Detail as hidden fields on the form

                                                                      Yes, if you want these fields to be populated upon a form submission, naturally they need to be on the form, as opposed to other fields that appear to have similar names.

                                                                       

                                                                      Will implementing these 2 changes get me closer to resolving our alert email fields not populating correctly?

                                                                      Yes, but I don't like the term "correctly" since that makes it seem like there's a bug. There isn't a bug, you're including blank fields in your alerts. Their remaining blank is correct behavior given your config.

                                          • Re: Where to place utm's in form embed code?
                                            Avtar Singh

                                            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

                                              • Re: Where to place utm's in form embed code?
                                                Trinity Levenson

                                                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.