Conditionally load Munchkin based on IP ranges

SanfordWhiteman
Level 10 - Community Moderator
Level 10 - Community Moderator

A pesky problem with Munchkin is that you can't selectively turn it off based on visitor characteristics.

You can choose Disable Munchkin Tracking on Marketo LPs, but that's for every visitor, and on your corporate site you're unlikely to have access to an on/off switch. So internal visitors show up in your stats (okay when testing, but bad after go-live) and it would be great to be able to exclude them, wouldn't it?

Although the best place to check IPs would of course be on the Munchkin server itself (thus no extra requests) we can ping a remote service to get the end user's IP, then use a l'il JS wrapper to conditionally load Munchkin based on whether the IP appears in allowed/disallowed Access Control Lists (ACLs).

Read the full post on TEKNKL :: Blog →​

488
0