SOLVED

Re: Munchkin code is not Tracking when I publish the code on azure site

Go to solution
Anonymous
Not applicable

Munchkin code is not Tracking when I publish the code on azure site

Issue Description

I have put below code plus munchkin asynchronous tracking code to fill out the form and track user events in my website and tested it in local host. when user logs in the marketo form is being submitted and for each following visits the munchkin code is sending the page visits and web click events for the known lead but when I published the same code to azure site it's not tracking the known lead instead when user logs in the form fill out event works fine but after then when user visit any of the pages or clicks the link its sending the event as anonymous lead. I am not sure why it's not getting the same cookie when user visits any of the page after form fill out event  from azure site but it does in local host. I tried different munchkin code (Simple, asynchronous, asynchronous jquery) but no luck.

var form = MktoForms2.allForms()[0];

        MktoForms2.whenReady(function (form) {

           form.onSuccess(function (vals, tyURL) {

               return false;

           });

        form.addHiddenFields({

            //These are the values which will be submitted to Marketo

            /**/

            "Email": "test@gmail.com",

        /**/

    });

    form.submit();

    });

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin code is not Tracking when I publish the code on azure site

Like Greg, I await your URL, which is always vital.

If the domain in use happens to be something.azurewebsites.net, you have to set Munchkin domainLevel:3, because azurewebsites.net is an implicitly public suffix (you cannot set cookies on azurewebsites.net, only its subdomains).

View solution in original post

5 REPLIES 5
Grégoire_Miche2
Level 10

Re: Munchkin code is not Tracking when I publish the code on azure site

Hi John,

please provide the URL.

-Greg

Anonymous
Not applicable

Re: Munchkin code is not Tracking when I publish the code on azure site

Hi Greg,

Thanks for your response. Here is the URL:

https://ignite-development-feature9.azurewebsites.net/

SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin code is not Tracking when I publish the code on azure site

That's a password-protected site.

As noted above, the problem is almost certainly the domain level. Read this blog post, same cause: https://blog.teknkl.com/munchkin-on-elasticbeanstalk-com-is-a-little-tricky/

SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin code is not Tracking when I publish the code on azure site

Like Greg, I await your URL, which is always vital.

If the domain in use happens to be something.azurewebsites.net, you have to set Munchkin domainLevel:3, because azurewebsites.net is an implicitly public suffix (you cannot set cookies on azurewebsites.net, only its subdomains).

Anonymous
Not applicable

Re: Munchkin code is not Tracking when I publish the code on azure site

Hi Sanford,

Thanks so much for suggesting domain level solution. I have updated the Munchkin code and it works like a charm.

Have a nice day!