20 Replies Latest reply on Jun 8, 2016 2:40 AM by Juli James

    Query string Tracking for Forms on Drupal Landing Page

    Juli James

      Hi everyone,

       

      I'm trying to set up some query string tracking for form fills on Drupal Landing pages.  I'm using Marketo forms and I want to track different sources using a query string.

       

      I've tried lots of different options but nothing seems to be pulling the form fill into the Smart Campaigns I've set up for tracking.  The options I've tried are:

       

      • Putting hidden fields into the form and then having the form look for the URL parameter
      • Using 'Fills in form' trigger with the query string as a constraint
      • Using 'Fills in form' trigger with a filter of 'visited webpage in last 5 mins with query string' filter

       

      But if I do a smart list of 'Fills in form' or just a basic smart campaign for 'fills in form' trigger all the names appear there but none have gone through the other tracking smart campaigns.

       

      Normally for Marketo Forms and Marketo landing pages I would just do the second option and it works every time.  But it's not working with the Drupal LPs.

       

      Can anyone help figure out what the problem is?

       

      Thanks

       

      Juli

        • Re: Query string Tracking for Forms on Drupal Landing Page
          Joe Reitz

          Hey Juli – I miss your face

           

          Sorry, can't help with Drupal, but step 2 as you outlined it works for us on Wordpress. What are you putting in as the constraint?

           

          Do you mean smart campaign or smart list? We've been able to do tracking via Smart Lists exactly like you outline in option 2 (fills out form with query string constraint). If you're using a smart campaign, I'm also curious to know what you've set your flow to be

          • Re: Query string Tracking for Forms on Drupal Landing Page
            Keith Nyberg

            Hey Juli,

             

            The questions Joe asked would give us some more clarity around an appropriate answer. I use option 1 as you outlined in your question. Here is my take and how my campaigns function, I would try using the "Fills Out Form" trigger with a Webpage Constraint instead of an additional "Visits Webpage in last 5 minutes" filter. Then you can build your flow step to request multiple referrer campaigns based on a URL parameter that you've identified.

             

            Example:

            Trigger: Fills Out Form (constraint Webpage = example webpage)

            Flow: Request campaign:

            1. IF UTM Medium = search, display, remarketing -> REQUEST: Online Advertising referral campaign
            2. IF UTM Medium = social -> REQUEST: Social referral campaign
            3. IF UTM Medium = sales -> REQUEST: Sales referral

             

            Let me know if what I wrote helped you at all or if I'm wayyy off.

             

            Cheers!

            Keith Nyberg

              • Re: Query string Tracking for Forms on Drupal Landing Page
                Sanford Whiteman

                I would try using the "Fills Out Form" trigger with a Webpage Constraint

                With embedded Forms 2.0 forms, you use the Referrer constraint, not Web Page, to identify the page hosting the form.

                 

                This is frequently misunderstood and people think there's no way to constrain by web page with embeds.

                4 of 4 people found this helpful
                • Re: Query string Tracking for Forms on Drupal Landing Page
                  Geoff Krajeski

                  One other thing to note when using Webpage or Referrer contraints is that you need to exclude the protocol (http:// or https://).

                   

                  This is another common mistake people make!

                    • Re: Query string Tracking for Forms on Drupal Landing Page
                      Elliott Lowe

                      I've not encountered an issue using Web Page as a constraint in the Filled Out Form filter with an embedded form.  The smart list selects the same number of leads as when using the Referrer constraint.  If you include http:// or https:// at the start of the URL, the Web Page constraint will not work.  You must include those protocols at the start of the URL with the Referrer constraint.  With the Referrer constraint you should use 'starts with' as your operator because the Referrer can contain query parameters.  With the Web Page constraint you can use the 'is' operator because the Web Page never has query parameters. 

                       

                      A couple of caveats.

                      • With the Web Page constraint and the 'is' operator is the URL must exactly match the URL shown in the Visit Web Page activity for the page on which the form is submitted.  The addition or omission of a forward slash at the end will cause no leads to be selected. Unfortunately the Fill Out Form activity doesn't display the Web Page URL, just the Web Page ID, which does make it a little more difficult to set up the argument properly than with the Referrer constraint using the 'starts with' operator.
                      • If you have a section in your page (e.g. www.domain.com/products/mobile-sdk/trial/#partners), you may have to include both the URL with the section and the URL without the section in the Web Page constraint; otherwise, some Fill Out Form activities may not be selected.  With the Referrer constraint and the 'starts with' operator, you would only include the portion of the URL without the section; otherwise some Fill Out Form activities may not be selected.
                      1 of 1 people found this helpful
                        • Re: Query string Tracking for Forms on Drupal Landing Page
                          Sanford Whiteman

                          The idea that the Web Page constraint on Filled Out Form activities is unreliable for embedded forms is the basis for the mistake in this blog post and also discussed/debated in this thread.

                           

                          You're right, though, that Web Page is more functional than not.  But because it requires an exact match on the URL structure for non-Marketo pages, including the hostname (rather than allowing a partial match on the /path/to/page, like you can get with Referrer, or allowing just the friendly page name like you can with Marketo LPs) it's never my first choice.  And any site that uses #! (hash-bang) navigation, like you alluded to when talking about HTML fragments (sections), will be almost impossible to use with exact Web Page constraints.

                           

                          I also recall, though I can't find my old work on this right now, that there are some situations where Web Page just doesn't function -- at all. These may be related to programmatic Forms 2.0 API stuff.

                    • Re: Query string Tracking for Forms on Drupal Landing Page
                      Justin Norris

                      Juli James

                       

                      I would grab the value into a hidden field -- your option #1. I find it to be the most flexible method.

                       

                      Are you using an embedded form or is it iframed? If it is an iframe you would need to use some extra code to transfer the parameters to the iframe from the parent page. An embedded 2.0 should work out of the box though.

                       

                      Ignoring the smart campaign for a second, I'd be curious to confirm if your data is being captured. When you fill out the form configured to populate the hidden field with the URL param, does the field update on the lead record in Marketo?

                       

                      If yes, then it's just an error in the smart list to troubleshoot. If no then we can troubleshoot the data capture piece. But the answer to that question will narrow it down.

                      • Re: Query string Tracking for Forms on Drupal Landing Page
                        Juli James

                        Wow!  Thanks for all the responses...I'll try to answer everything here.

                         

                        Joe Reitz (miss your face too ) - I use Option 2 on all our Marketo LPs, but it doesn't work on Drupal LPs.  I'm trying to use a Smart Campaign with the 'Fills out form' trigger and the constraint of 'Querystring contains'.  The leads are pulling into a smart list weirdly but not through the smart campaign.

                         

                        Keith Nyberg  - I'll try that set up now - I didn't know you had to use 'referrer' instead of 'webpage' for external pages.  But will the query string option still work as a constraint?

                         

                        Geoffrey Krajeski - I never out http or https at the beginning of my web URLs.

                         

                        Sanford Whiteman and Elliott Lowe - thanks of the additional information.

                         

                        Justin Norris - I've tried using option 1 but it doesn't work either. The form is an embedded form with additional Drupal code around it.  I've just checked again with the hidden field and thats not being pulled through from the URL.  In fact when I set up the Smart Campaign of 'Fills out form' with the constraint of 'Querystring NOT contains' it pulls in the lead WITH the query string!

                         

                        Thanks

                         

                        Juli

                        • Re: Query string Tracking for Forms on Drupal Landing Page
                          Juli James

                          Is anyone able to help?  I've had to revert to Marketo LP's for now, but need to figure this out so that we can continue to use Drupal pages where needed.

                           

                          Thanks

                           

                          Julz

                            • Re: Query string Tracking for Forms on Drupal Landing Page
                              Sanford Whiteman

                              Need an example URL.  Query param --> AutoFill hidden field is standard stuff for embedded forms.

                                • Re: Query string Tracking for Forms on Drupal Landing Page
                                  Juli James

                                  Here is the URL I've been using:

                                  Future People – Deutschland im Blickpunkt 

                                   

                                  This one has the query string of LS and I set up a hidden field on the Marketo form to look for the URL parameter of 'ls' and this feeds into the Lead Source field.  Marketo is just not recognising the Query string no matter how many different variations I used to try and get it working.

                                   

                                  I've also used 'utm_source' as the query string and set that as a hidden field in the Marketo form as well.  If you look at the form in Drupal I can't see these hidden fields showing, but that is how all of the pages are coded, so if I have to add in a hidden field into the Drupal code that will be an issue.

                                   

                                  Thanks

                                   

                                  Juli

                                    • Re: Query string Tracking for Forms on Drupal Landing Page
                                      Sanford Whiteman

                                      That page isn't using the Marketo embed code.  It's static HTML.

                                       

                                      Hence it isn't pulling the form descriptor (form setup metadata) from Marketo, including such important aspects as the hidden field AutoFill.

                                       

                                      I think you're misunderstanding the (lack of) connection between the way Drupal presents the form and the way the real form is set up in Marketo. If you use the actual Marketo embed code, it'll work fine.

                                        • Re: Query string Tracking for Forms on Drupal Landing Page
                                          Juli James

                                          I just gave the web developers the code that they wanted.  I've been told they only want to use the Form ID as they code the form within the landing page itself. I always thought it had to be the full embed code, but I was trusting our developers.  

                                           

                                          I understand how it all works together but when I'm being told by my developers that they've done everything right and I only know basic HTML (hence me being able to see the correct Form ID, Hidden fields etc) then you have to trust the experts right?

                                           

                                          How would the developers make the form look like they need whilst also using the embed code?

                                           

                                          Thanks

                                           

                                          Juli

                                            • Re: Query string Tracking for Forms on Drupal Landing Page
                                              Elliott Lowe

                                              Juli James when the form is submitted is a Fill Out Form activity added to the activity log of the lead record?  If not, your developers are using the SOAP or ReST APIs to create / update the record (which is a bad practice) and your Fills Out Form trigger/filter will not be able to select these leads.  Instead, you'll need to update the value in some field (e.g. Latest Form) and use that as the value in a Data Value Changes trigger/filter.  If they are using the API, I'd strongly encourage you to get them to use HTTP Post to the Marketo endpoint as this will create a Fill Out Form activity.  If they use the embed form code, Sanford Whiteman has discussed several techniques for customizing forms using CSS and the Forms 2.0 API.

                                              • Re: Query string Tracking for Forms on Drupal Landing Page
                                                Sanford Whiteman

                                                Well, they are definitely wrong.  What they're doing is using a one-time snapshot of the way form's HTML is it rendered way back when.

                                                 

                                                Marketo will, conveniently, still process this frozen-in-time version of the form (since the Form ID still exists in your Marketo instance) but of course it will not honor any fields added or removed since they last copied-and-pasted the HTML.  And hidden fields you set up in the Marketo Form Editor will not only not appear on the form, they could not be autofilled on the form because they're not using the Forms 2.0 JS which is responsible for parsing cookie/query/referrer info into hidden fields. This same relatively simple functionality can be emulated with your own JS.  But if you don't do anything, the hidden fields are just going to be empty.

                                                 

                                                Elliott they're using the /save endpoint with what amounts to a custom form.  That's relatively good in that it creates a Filled Out Form activity.  It's terrible in that it appears to be linked to Marketo but is disconnected from the form as it currently is maintained by Juli .

                                                • Re: Query string Tracking for Forms on Drupal Landing Page
                                                  Justin Norris

                                                  Juli James

                                                   

                                                  "How would the developers make the form look like they need whilst also using the embed code?"

                                                   

                                                  To answer your question, this would be done using CSS, just as they style any other element on the page. It is more tricky only in that the embedded forms have a lot of built in styles that you first need to override. But any competent front-end developer should be able to do it.

                                                   

                                                  There may be some really unique things that are difficult to replicate, but I know that generally we get a mockup from clients and are able to make a Marketo form to match it.

                                        • Re: Query string Tracking for Forms on Drupal Landing Page
                                          Ulf Deeg

                                          I'd consider using a cookie to store those params and then autofill form fields from the cookie. this way you can also keep the source if they browse to a different page and then submit a form.

                                           

                                          EDIT: got sidetracked. this is for Marketo embedded forms, too

                                          1 of 1 people found this helpful