Block Viewers from seeing Stickbar based on IP Address


#1

I understand you can Block IP Addresses from analytics/reports from unbounce. However, what I was hoping is to find out if I am able to not show stickybars/convertables to computers using a certain IP address. Will this IP Filter support that?


#2

Hey @Ruth_Ann_Laramee,

IP Filter won’t support that but here’s a script you might find useful. Add it to any host pages where you want to block popups/sticky bars for an IP. All you need to do is specify the value of the IP to block, “ipToBlock”. Let me know if anything is unclear.

<script type="application/javascript">
  // Set the IP address to block
  let ipToBlock = 'x.x.x.x'
  let ip;
  
  function getIP(json) {
    ip = json.ip;
  }
  
  window._ubeConfig = window._ubeConfig || {};
  window._ubeConfig.shouldShowOverlay = function() {
   	if (ip === ipToBlock) {
      return false;
    }
  }
</script>

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