SOLVED

Re: SFDC Campaign assignment based on form submissions and querystring data

Go to solution
Pavel_Ivanov
Level 2

SFDC Campaign assignment based on form submissions and querystring data

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:

  1. Joan does not exist in our Marketo database. She clicks on a banner and comes to our website, carrying a utm_source=linkedin. She submits a form, Marketo looks at the submission and sees there's a utm_source=linkedin, so based on the program flows it puts the lead in the 2022-LinkedIn SFDC Campaign.
  2. A week later Joan comes to our website by manually typing the url in her browser. This time there are no UTMs associated with this session. She navigates to another form and submits it. Here's the tricky part - Marketo looks at this submission, checks Joan's profile, sees that there's a utm_source=linkedin (from the previous form submission) and counts this again as a submission coming via lnikedin. However, this would not be correct, because this is direct traffic.

 

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)

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: SFDC Campaign assignment based on form submissions and querystring data


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

View solution in original post

19 REPLIES 19
Chris_Willis1
Level 8 - Champion

Re: SFDC Campaign assignment based on form submissions and querystring data

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.

 

Pavel_Ivanov
Level 2

Re: SFDC Campaign assignment based on form submissions and querystring data

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?

Michael_Florin
Level 10

Re: SFDC Campaign assignment based on form submissions and querystring data

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:

Michael_Florin_0-1658762520621.png

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.

 

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: SFDC Campaign assignment based on form submissions and querystring data

@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. 🤔

 

Pavel_Ivanov
Level 2

Re: SFDC Campaign assignment based on form submissions and querystring data

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.

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: SFDC Campaign assignment based on form submissions and querystring data


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?

 

Pavel_Ivanov
Level 2

Re: SFDC Campaign assignment based on form submissions and querystring data

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.

SanfordWhiteman
Level 10 - Community Moderator

Re: SFDC Campaign assignment based on form submissions and querystring data


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

SanfordWhiteman
Level 10 - Community Moderator

Re: SFDC Campaign assignment based on form submissions and querystring data

@Pavel_Ivanov I also wrote this up on the Products blog:

In Form Editor, “null” isn’t the same as NULL (huh?)