public function setVisitorIpAddress(&$ip)
    {
        $ipObject = IP::fromBinaryIP($ip);

        if (!$this->isActive()) {
            Common::printDebug("Visitor IP was _not_ anonymized: ". $ipObject->toString());
            return;
        }

        $privacyConfig = new Config();

        $newIpObject = self::applyIPMask($ipObject, $privacyConfig->ipAddressMaskLength);
        $ip = $newIpObject->toBinary();

        Common::printDebug("Visitor IP (was: ". $ipObject->toString() .") has been anonymized: ". $newIpObject->toString());
    }