SOLVED

Query string Tracking for Forms on Drupal Landing Page

Go to solution
Highlighted
Level 7 - Champion

Re: Query string Tracking for Forms on Drupal Landing Page

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

Highlighted
Level 10 - Community Moderator

Re: Query string Tracking for Forms on Drupal Landing Page

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

Highlighted
Level 7 - Champion

Re: Query string Tracking for Forms on Drupal Landing Page

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

Highlighted
Level 10 - Community Moderator

Re: Query string Tracking for Forms on Drupal Landing Page

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.

Highlighted
Level 7 - Champion

Re: Query string Tracking for Forms on Drupal Landing Page

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

Highlighted
Level 6 - Champion Alumni

Re: Query string Tracking for Forms on Drupal Landing Page

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.

Highlighted
Level 10 - Community Moderator

Re: Query string Tracking for Forms on Drupal Landing Page

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 Lowe​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 James.

View solution in original post

Highlighted
Level 7 - Champion

Re: Query string Tracking for Forms on Drupal Landing Page

Amazing thank you!  I kept telling them it was a Drupal issue.  They are using an API to do the form fills, so this explains everything!  I'll be forcing Marketo LP's from now on then to ensure that I don't lose any tracking or triggers etc.

Thank you everyone for your help!

Highlighted
Level 8 - Champion Alumni

Re: Query string Tracking for Forms on Drupal Landing Page

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.

Highlighted
Level 10 - Community Moderator

Re: Query string Tracking for Forms on Drupal Landing Page

+ if there's something really challenging you can just build a totally custom form, but Make a Marketo Form Submission in the background so there's literally nothing lost on either end.  The background submission will autofill the hidden fields on-the-fly.