Wix site Munchkin - anonymous to known lead | Community
Skip to main content
Stacey_Richter
New Participant
May 12, 2020
Solved

Wix site Munchkin - anonymous to known lead

  • May 12, 2020
  • 1 reply
  • 4848 views

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 mysite.com new site web.mysite.com.  Maybe an issue with cookies?

 

Thanks for any help anyone can provide.

Best answer by SanfordWhiteman

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>

 


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?

1 reply

SanfordWhiteman
New Participant
May 12, 2020

Sounds like you should read

 

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

 

P.S....

 


Originally mysite.com new site web.mysite.com

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

Stacey_Richter
New Participant
May 13, 2020

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
New Participant
May 13, 2020

Only looking at your site can answer this.

 

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