Hello,
I'm working on building a SFDC Campaign Assignment program in Marketo based on form submissions. I have an idea and want to run it through the community here and see what I might be missing.
What we're trying to achieve is assign leads to the correct SFDC campaigns, based on the information coming through form submissions, more precisely, the UTMs or the lack of them. We have our forms setup with all necessary hidden UTM fields.
The issue we're facing comes from the fact that Marketo is last-touch based and that it does not update fields to NULL value if a form submission comes through with an empty field, like a utm field, for example.
To elaborate, here's an example:
In order to solve this, I'm thinking of using the querystring value. It carries all the important information I'm looking for and basically shows what's coming through the door with each form submission and not historic values - whether there is something there or there isn't. In the above example, it shouldn't get the direct traffic wrongly as a submission coming from linkedin. HOWEVER, since the Querystring is not passed on pages, it is only available on the first page that the lead lands on. So it would be rather useless on any page that the lead navigates to, other than the one they landed on and I cannot use the out-of-the-box querystring option for the Fills out form trigger.
So in order to solve this I'm thinking of adding a hidden form field that would be recording the querystring value upon visit. The lead would either be coming through paid with some important value in the querystring (UTMs in this case) or through direct with no value in the querystring. This can be kept and then passed on to Marketo with the form submission.
It should be able to let me use the below setup.
Smart list:
- Fills out form
- Quesystring (the new hidden field) contains (utm_source)
Flow:
- Add to SFDC Campaign:
-- If utm_source IS "google" add to 2022-Google SFDC Campaign
-- If utm_source IS "bing" add to 2022-Bing SFDC Campaign
- Wait 5 minutes
- Change data value of the Querystring field to NULL (so that it's ready for a new form submission)
Solved! Go to Solution.
The hidden querystring field after each form fill, so it's ready for the following form submission (if any, ever). The default will indeed be empty. I don't need this information staying there for more that it would take for the flows to work and assign the people to the right SFDC campaign
You’re just setting yourself up for race conditions and difficult-to-follow logic.
There’s no ill consequence from having a field keep its value until overwritten by another round of user input. The key is that you want all your UTM fields to be updated as a group — you don’t want utm_medium to come from one form post while utm_term comes from another.
So call the fields something useful (Most Recent UTM Medium, etc.) and make sure that on any given form post they’re either sent as the real value (from the URL) or default to the literal value “NULL“ (which will empty the field if they weren’t in the URL).
This seems overengineered.
If you want the form to NULL out your hidden fields when the corresponding query params are not present, then set the default form field value to NULL.
Hi Sanford,
The default form field value is NULL. It's a new field that we're yet to create, so no information will be recorded in it until anyone submits a form.
Apologies if I have not explained correctly the logic I have in my mind:
Set to NULL:
Keep info in utm fields:
Does that make sense?
The hidden querystring field after each form fill, so it's ready for the following form submission (if any, ever). The default will indeed be empty. I don't need this information staying there for more that it would take for the flows to work and assign the people to the right SFDC campaign
You’re just setting yourself up for race conditions and difficult-to-follow logic.
There’s no ill consequence from having a field keep its value until overwritten by another round of user input. The key is that you want all your UTM fields to be updated as a group — you don’t want utm_medium to come from one form post while utm_term comes from another.
So call the fields something useful (Most Recent UTM Medium, etc.) and make sure that on any given form post they’re either sent as the real value (from the URL) or default to the literal value “NULL“ (which will empty the field if they weren’t in the URL).
There’s no ill consequence from having a field keep its value until overwritten by another round of user input.
The reason I want to reset/empty the field value of the "querystring" field after each submission is that if a new form submission comes through with no querystring (for example, someone types in our website url and goes on to fill out a form) then it the field will keep it's previous value.
Marketo will not automatically update it to NULL.
What do you think?
if a new form submission comes through with no querystring (for example, someone types in our website url and goes on to fill out a form) then it the field will keep it's previous value.
Marketo will not automatically update it to NULL.
What do you think?
I think (know) that this is not true, because if the default value of an auto-filled hidden field is the string “NULL”, Marketo will send the string “NULL” to the server if the query param is not present. And “NULL” is Marketo’s special keyword that erases the previous value.
Sanford,
What you just said is news to me.
I admit I have never actually thought I can setup the default value of a hidden field to be NULL. In fact I think this renders all complex setup of the querystring field useless. If we're sure that the UTM fields are updated with no leftovers from previous form submits, then this should solve the issue.
Off to testing now. I'll update to thank you once again when I'm done.
^ This
You don't necessarily need to save that URL parameter in a field. You might as well base your campaign that associates the person with the campaign on the existence of the parameter at form submit. Like this:
But your approach will also work. And it's not all uncommon to NULL a field that's only supposed to hold a value temporarily.
Hi Michael,
I really wanted to use the built-in querystring parameter. Unfortunately it will only be available if the person submits the form on the page they originally landed on (with a querystring present). Should they decide to click around the site, the querystring will be lost - as far as I know it's not really possible to pass the querystring parameter to other pages on the site. That's why I'm adding a custom hidden field that will record the querystring value on the initial visit before it's lost due to navigating to another page.
That's why I'm adding a custom hidden field that will record the querystring value on the initial visit before it's lost due to navigating to another page.
How are you storing the query string data on a Marketo field tied to a person before the visitor fills out the form? Are you storing the UTM param value in the browser cookie and then referencing it to fill the hidden form field when user submits the form?
To be fair, I don't know the details. Our web agency said they can take the querystring value and store it into a hidden field on the form that's on the page the visitor lands on. From then on, the form would remember it.
...and store it into a hidden field on the form that's on the page the visitor lands on. From then on, the form would remember it.
I don't even know what they'd mean by that. You wouldn't pre-fill hidden fields that are supposed to come from query parameters. So the form doesn't "remember" anything, every time the page loads the forms library reads the value again (if present) from the URL.
@Pavel_Ivanov I also wrote this up on the Products blog:
Hi @SanfordWhiteman,
Thank is amazing and described so much better than I did on our internal meetings. Thank you for writing about this.
Great! One of the reasons I put stuff on the blog is so I myself can link to it instead of having to explain to people on the spot. 🙂
@Michael_Florin, OP is using the query string ("utm_source") field's value to add people to corresponding SFDC Campaign in the flow. I'm not sure if we'd be able to use the querystring constraint from the filled out form activity that triggered the campaign in the flow to add people to the correct campaign in the SFDC. Apologies, if I'm missing on some obvious way/workaround here. 🤔
That approach does appear to be valid. One thing that I would recommend would be this (because you may want to keep a UTM history in Marketo for tracking).
When utm_source is changed (and change is to "not empty"), conduct the Salesforce campaign sync as you have in here.
Then, update a UTM history field with the utm_source (and other) values along with a datestamp for when that utm_source value was updated via a form.
Then, NULL out the utm_source (and other UTM collection) fields.
Hi Chris,
Thank you for this suggestion.
We actually were pondering whether to do this.
I
'm not really convinced what the value of it might be, though, purely practical. It looks to me that it would be quite cumbersome to extract any useful information from a field that has a number of utm values and dates. Keeping the information for deep dives is the only justification I can think of.
What am I missing here?