SOLVED

Re: Adding a value to a field when submitting the Munchkin

Go to solution
Charles_THIERY
Level 3

Adding a value to a field when submitting the Munchkin

Hello,

I'm working on the GDPR compliance and I found this very interesting post :

"Conditionally loading Munchkin on Marketo LPs (for GDPR & related policies)" from Sandford Whiteman.

I was wondering if I can keep track of the action of the user when he accepts the cookies, by pushing a value directly in the database for consent and date.

Sandford Whiteman​, is it possible to pass an object for feeding 2 fields of my databse through the custom Munchkin initialization options please? If yes, how should I write it please?

Best Regards,

Charles

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Adding a value to a field when submitting the Munchkin

Hi Charles,

It's the Sanford Whiteman​ profile btw.   (You @'d one of my secondary profiles, where my name is unfortunately misspelled!)

When consent is granted, you could make a hidden form post with just the DateConsented field (you really only need one datetime field to record this, since an empty datetime is akin to a boolean false).

But this is only straightforward when the Munchkin session is already associated with a named lead in your database.

The session will be associated if they clicked a link in an email (even if it's a brand-new Munchkin session that just started) or if they've previously filled out a form. So those cases are fine.

But if they've merely clicked a public ad, organically found your site, etc. the session is still anonymous. Anonymous sessions must be presented w/the cookie popup, but you won't know who they are yet, so there is no place in the database to save the changes at that point. That is, unless you want to create a named lead with no email address and merge the real email address in later -- things get very complex with this approach, as well as potentially costly as all such leads count against your subscription.

In lieu of the form post, you can use the Munchkin API associateLead function to pass field values (you have to generate a Munchkin associator token to do this, though, which adds development overhead).  This is more efficient than a form post, but has the same catch as above. If the person is in your db, or you have enough info to add them to your db, then saving the value is easy. But it's not generally practical to save data to the Marketo database if you don't know who someone is (i.e. their Email Address) yet.

It would make more sense to have a Smart Campaign that triggers when the lead is created or merged via normal means and populates the field then. This, however, works better with Munchkin 2.0 (which you probably aren't on yet) than with Munchkin 1.x. There's no one-size-fits-all solution and I suggest you get a developer who knows Munchkin inside and out to talk about the options for your particular case. Some approaches use a combination of cookies, invisible forms, and webhooks to "replay" a lead's anonymous actions onto the now-known lead.

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Adding a value to a field when submitting the Munchkin

Hi Charles,

It's the Sanford Whiteman​ profile btw.   (You @'d one of my secondary profiles, where my name is unfortunately misspelled!)

When consent is granted, you could make a hidden form post with just the DateConsented field (you really only need one datetime field to record this, since an empty datetime is akin to a boolean false).

But this is only straightforward when the Munchkin session is already associated with a named lead in your database.

The session will be associated if they clicked a link in an email (even if it's a brand-new Munchkin session that just started) or if they've previously filled out a form. So those cases are fine.

But if they've merely clicked a public ad, organically found your site, etc. the session is still anonymous. Anonymous sessions must be presented w/the cookie popup, but you won't know who they are yet, so there is no place in the database to save the changes at that point. That is, unless you want to create a named lead with no email address and merge the real email address in later -- things get very complex with this approach, as well as potentially costly as all such leads count against your subscription.

In lieu of the form post, you can use the Munchkin API associateLead function to pass field values (you have to generate a Munchkin associator token to do this, though, which adds development overhead).  This is more efficient than a form post, but has the same catch as above. If the person is in your db, or you have enough info to add them to your db, then saving the value is easy. But it's not generally practical to save data to the Marketo database if you don't know who someone is (i.e. their Email Address) yet.

It would make more sense to have a Smart Campaign that triggers when the lead is created or merged via normal means and populates the field then. This, however, works better with Munchkin 2.0 (which you probably aren't on yet) than with Munchkin 1.x. There's no one-size-fits-all solution and I suggest you get a developer who knows Munchkin inside and out to talk about the options for your particular case. Some approaches use a combination of cookies, invisible forms, and webhooks to "replay" a lead's anonymous actions onto the now-known lead.

Charles_THIERY
Level 3

Re: Adding a value to a field when submitting the Munchkin

Hello Sanford,

Sorry for the misspelling.

Ok, I got your point, I thought the lead was created automatically as unknown in the database (when it's the first time they reach my environment) and so I could add a consent and consent date regarding the IP address and it will automatically merge to the additional info whenever the lead fills out a form for the first time. I thought that because when I erase my cookies and navigate then fills a form it sounds marketo do not make mistake on associating my IP address and history to my email address.

Maybe the other way around would be to add into the cookies the consent and consent date the first time the lead visits the website and push this info into all form so it get pushed the first time he will fill out the form, what do you think about this solution? Do you have an idea how to code it please?

BR,

Charles