SOLVED

Create a LP that clears you Cookie!

Go to solution
Highlighted
Level 10 - Community Moderator

Re: Create a LP that clears you Cookie!

Sure, I like the idea of iframes to run through a bunch of domains at once.

Highlighted

Re: Create a LP that clears you Cookie!

This actually brings up an interesting thought: would it be possible to alter munchkin.js using something like l2 or ipify to check if the public IP is associated with the Marketo instance's employees' IP and then have it disregard any mkt_trk parameters sent over URL to update the tracking cookie? The documentation on createTrackingCookie isn't clear on whether it also does the overwrite when mkt_trk is passed via parameter, but my educated guess is that setting that to false would block the update.

Obviously this would cause some issues for internal testing, but putting that aside (and assuming there'd be a way around that, like having a proxy just for testing) would such a solution work? This is a common source of confusion within companies.

Highlighted
Level 10 - Community Moderator

Re: Create a LP that clears you Cookie!

Sure, but you don't need to change how Munchkin behaves, just wrap it in a condition, e.g.

<script>

function conditionalMunch(ipifyResult) {

        var allowedPatterns = [

            '1.2.3.*',

            '108.12.130.200',

        ];

        var ip = ipifyResult.ip,

            isAllowed = allowedPatterns

            .map(function(pattern) {

                return new RegExp('^' + pattern.replace(/(\.)/g, '\\$1').replace(/(\*)/g, '\\d{1,3}') + '$');

            })

            .some(function(rePattern) {

                    return rePattern.test(ip);              

            });

    if (isAllowed) Munchkin.init('410-XOR-673');

}

</script>

<script type="application/javascript" src="https://api.ipify.org?format=jsonp&callback=conditionalMunch"></script>

That wildcard pattern matching is quite naive but should do the trick.