SOLVED

Re: Wix site Munchkin - anonymous to known lead

Go to solution
Stacey_Richter
Level 1

Wix site Munchkin - anonymous to known lead

We have recently migrated to a Wix site and can't quite get munchkin working quite right.  I'm seeing  anonymous traffic in marketo and I'm also seeing traffic from known leads that had previously been in Marketo prior to the move to Wix. 

 

However for my test I use a new device with different IP address, navigate to Contact Us (our marketo form) and submit. THis adds the lead and I see the lead has activity showing the submission of the form... but all traffic after this point is not associated and continues to show as anonymous.  I also made sure to disable Firefox tracking protection feature... 

I have the munchkin async code copied from marketo (no edits) and using Wix Tracking/Analytics/custom code and added to the Head and loading on each new page.

 

I'll add that we continue to have our old site still live due to blog posts and other links we needed to maintain but the domains might cause an issue?  Originally https://mysite.com new site https://www.web.mysite.com.  Maybe an issue with cookies?

 

Thanks for any help anyone can provide.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Wix site Munchkin - anonymous to known lead

OK, the Munchkin session cookie is being set at the topmost private domain (aventriahealth.com) so that's not the problem. You're right, Wix changed the way they inject code at some point so that it's no longer sandboxed in an IFRAME. 

 

The problem is you put the the Marketo form itself in an IFRAME on a completely different domain (www-web-aventriahealth-com.filesusr.com)!

 

So this can't possibly work, because cookies are not shared across private domains. The form post doesn't even include a cookie. It does get logged to Marketo, of course, as a Filled Out Form, but has no other context, so the session is still anonymous. (Or known if it happened to already be known, but it won't become known from the form fillout.)

 

Why aren't you using an embedded Marketo form, which would solve this problem?

View solution in original post

10 REPLIES 10
SanfordWhiteman
Level 10 - Community Moderator

Re: Wix site Munchkin - anonymous to known lead

Sounds like you should read

 

https://blog.teknkl.com/adding-munchkin-to-a-wix-site/

 

P.S....

 


Originally https://mysite.com new site https://www.web.mysite.com

Please use the standard domain example.com  instead of somebody's private domain, thanks.

Stacey_Richter
Level 1

Re: Wix site Munchkin - anonymous to known lead

Hi.  Thanks for the response! Yeah. Good point with example.com

 

I did read your posts but I started to think maybe Wix has changed since 2016 since in the posts I've read here and then on your blog it references adding code via HTML Settings but now they have a feature to add tracking/analytics code but maybe it's basically doing the same thing although I don't see iframe being referenced in the page source.  This is what I'm seeing below.  Is the embed essentially an iframe?

 

<!--head html embeds start-->

<script type="text/javascript">
(function() {
var didInit = false;
function initMunchkin() {
if(didInit === false) {
didInit = true;
Munchkin.init('XXX-XXX-XXX');
}
}
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src='//munchkin.marketo.net/munchkin.js';
s.onreadystatechange = function() {
if (this.readyState == 'complete' || this.readyState == 'loaded') {
initMunchkin();
}
};
s.onload = initMunchkin;
document.getElementsByTagName('head')[0].appendChild(s);
})();
</script>

SanfordWhiteman
Level 10 - Community Moderator

Re: Wix site Munchkin - anonymous to known lead

Only looking at your site can answer this.

 

Also, can you use the syntax highlighter on your code so it's readable?

 

syntax_js.png

Stacey_Richter
Level 1

Re: Wix site Munchkin - anonymous to known lead

Thanks again. Didn't see the code sample tool.  

 

https://www.web.aventriahealth.com/

<script type="text/javascript">
(function() {
  var didInit = false;
  function initMunchkin() {
    if(didInit === false) {
      didInit = true;
      Munchkin.init('XXX-XXX-XXX');
    }
  }
  var s = document.createElement('script');
  s.type = 'text/javascript';
  s.async = true;
  s.src='//munchkin.marketo.net/munchkin.js';
  s.onreadystatechange = function() {
    if (this.readyState == 'complete' || this.readyState == 'loaded') {
      initMunchkin();
    }
  };
  s.onload = initMunchkin;
  document.getElementsByTagName('head')[0].appendChild(s);
})();
</script>

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Wix site Munchkin - anonymous to known lead

OK, the Munchkin session cookie is being set at the topmost private domain (aventriahealth.com) so that's not the problem. You're right, Wix changed the way they inject code at some point so that it's no longer sandboxed in an IFRAME. 

 

The problem is you put the the Marketo form itself in an IFRAME on a completely different domain (www-web-aventriahealth-com.filesusr.com)!

 

So this can't possibly work, because cookies are not shared across private domains. The form post doesn't even include a cookie. It does get logged to Marketo, of course, as a Filled Out Form, but has no other context, so the session is still anonymous. (Or known if it happened to already be known, but it won't become known from the form fillout.)

 

Why aren't you using an embedded Marketo form, which would solve this problem?

Stacey_Richter
Level 1

Re: Wix site Munchkin - anonymous to known lead

Oh that would be it.

 

I'll have to ask why they didn't go this route and see how this is setup in Wix but I think I might run into an issue if I use the embed page/url since the marketo account was provisioned a long time ago and doesn't seem to have a certificate for the domain and wix only allows HTTPS URLs for embedding approach. 

 

I THINK to enable HTTPS for landing pages and forms that we would need to have that provisioned and believe there's then further changes to be made possibly with existing links, images,...  I have to look into that further (and the cost I read was an add'l $1100 a year maybe).  

 

Thanks again for all of your help.

 

Stacey_Richter
Level 1

Re: Wix site Munchkin - anonymous to known lead

Well, I see that we used in Wix editor, More/Custom Embed/iframe HTML with the code option and using the marketo form embed code.

Screen Shot 2020-05-14 at 11.12.37 AM.png

 

As for that URL for the iframe www-web-aventriahealth-com.filesusr.com...  it's Wix which apparently uses this for iframe embeds. 

My problem is going to be needing to add a cert to marketo landing page/form domain (pretty sure I think) so that I can use the embed website address and just point to the form or some other way to handle the contact form and lead association. Maybe using the marketo API?

SanfordWhiteman
Level 10 - Community Moderator

Re: Wix site Munchkin - anonymous to known lead

Well, I see that we used in Wix editor, More/Custom Embed/iframe HTML with the code option and using the marketo form embed code.

Screen Shot 2020-05-14 at 11.12.37 AM.png


But did you do this same thing for the Munchkin embed code? Because it doesn't make sense that one is sandboxed in an IFRAME and the other is not.

 

My problem is going to be needing to add a cert to marketo landing page/form domain (pretty sure I think) so that I can use the embed website address and just point to the form or some other way to handle the contact form and lead association. Maybe using the marketo API?


You already are loading the form from a secure domain: //app-sj11.marketo.com is secure if the outer page is secure, and vice versa. SSL isn't the issue (using a marketo.com domain can cause the form to be blocked by tracking protection in Firefox or with 3rd-party plugins, but that's an entirely different matter).

 

So let's not get distracted by the secure LP question for the moment. The question is how are you injecting Munchkin vs. how you're injecting the form embed. Is Wix "intelligently" deciding your form embed needs to be wrapped in their own IFRAME, or are you doing something differently?

Stacey_Richter
Level 1

Re: Wix site Munchkin - anonymous to known lead

The form was added by using Add more/iframe... to the specific contact page via the editor.  The munchkin code is added via admin/advanced/tracking & analytics using custom code/all pages.  Do you think I could add the munchkin code to the embed contact form code?