SOLVED

Kiosk mode for forms - Can you turn off munchkin code tracking for forms?

Go to solution
Ayan_Talukder
Level 5

We have an 'internal' form we use for tradeshows. Basically when our sales staff get a business card, we've created a form to collect their infomration easily to create a task in salesforce depending on what tradeshow it is.

It's been working great, however we have noticed the munchkin code tracking may tag one person as another. I thought there was some sort of an option to turn off tracking but I couldn't see it.

Any ideas or suggestions would be greatly appreciated. Thanks!

1 ACCEPTED SOLUTION
17 REPLIES 17
Ayan_Talukder
Level 5

Thanks for all the responses everyone!

We have embedded the form onto a page on our website.

Sanford Whiteman​ thanks for sharing the article. If I am not using a Landing Page, will the script work if I paste it above the form embed code?

Thanks again!

SanfordWhiteman
Level 10 - Community Moderator

Below, not above.

Ayan_Talukder
Level 5

Thank you Sanford, I've added the code.

Dan_Stevens_
Level 10 - Champion Alumni

In addition to disabling munchkin tracking at the LP level; and adding the script, that Sanford refers to, within the <head> of the template, we also include the highlighted code (NOTE, you must use your own domain here):

pastedImage_0.png

SanfordWhiteman
Level 10 - Community Moderator

But deleting the cookie *entirely* prevents any pages from being logged under the browser's primary user, which may not be desirable (I still want my partners to have their activity logged, I just don't want them logging hits under their referral leads).

Grégoire_Miche2
Level 10

Hi Dan,

What we often do is to add a LP Boolean variable in the template and injects its value in the 2 scripts so that the use can decide to make and LP untracked easily.

-Greg

Dan_Stevens_
Level 10 - Champion Alumni

Hi Greg - interesting.  Can you share some more detail/screenshots around this approach?

Grégoire_Miche2
Level 10

Here you are:

<meta class="mktoBoolean" id="Tracking" mktoName="Mkto tracking" default="true" true_value_name="Activated" false_value_name="Deactivated" true_value="yes" false_value="no"/>

<script>

    if (‘${Tracking}'==’no') {

        document.cookie = "_mkto_trk=;path=/;domain=.domain.com;expires=0"   

    }

</script>

<script>

        MktoForms2.whenReady(function(form) {

                if ('${Tracking}'=='no') {

                    form.addHiddenFields({"_mkt_trk": ""});

                }

                form.onSubmit(function(form) {

                    if ('${Tracking}'==’No') {

                        form.vals({"_mkt_trk": ""});

                    }

                })

        })

</script>  

Best regards,

Greg

SanfordWhiteman
Level 10 - Community Moderator

One of those has a typo (check caps on "No").

And why not use Boolean true/false, that way you don't have to quote it or compare it to anything? Just

if(${variable})

Grégoire_Miche2
Level 10

Hi Sanford,

Thx for the typo.

I used text because I found if ('${Tracking}'=='no') easier to read for non developers

-Greg

SanfordWhiteman
Level 10 - Community Moderator

Should a non-developer be touching this code, though? Anyway, I think

  if (${trackingEnabled})

is really easy to understand. And less prone to typos.

TBlane_McMichen
Marketo Employee

Just for thoughts...

I have put code like this into a token and then included it in the landing page if I desire it.

(It doesn't prevent someone from changing the content of the token, but it is another option.)

Grégoire_Miche2
Level 10

Hi Blane,,

You might find this interesting : Best way to add a script in a guided landing page

-Greg

Grégoire_Miche2
Level 10

Or maybe :

if (!${trackingEnabled})

Non developper are not supposed to touch this, BUT I see Marketo admins at my customer who sometimes dig into template code... Or a couple who took the initiative to "correct" the code we had provided.

-Greg

Veronica_Holme4
Level 10 - Champion Alumni

I'm making the assumption that you are using a Marketo LP as your "internal" page. You may be looking for the "Disable Munchkin Tracking" on the LP editor - it isn't there, it's in the LP template editor. You need to create a special version of your kiosk LP template with no tracking and then create your LP from that.

stoptracking.png

SanfordWhiteman
Level 10 - Community Moderator

This won't work, Veronica. Turning off tracking from that page only means the cookie won't be created on that page. A cookie that already exists, even if the current page has Munchkin completely disabled, will still be attached to the form unless the above method is followed.

SanfordWhiteman
Level 10 - Community Moderator