アクセスしたユーザー情報を元に条件を分岐する処理を昔書いたことがあったので、その辺。具体的にはIPアドレス及びステータスはipinfo.ioのAPIを使って取得したり、Adblockのチェックにはfuckadblock.jsを使う。

$ bower install fuckadblock
$(function() {
	//ipinfo
	if (window.location.protocol == "http:") {
		$.get("//ipinfo.io", function (response) {        
			IP = response.ip;
			Hostname = response.hostname;
			Loc = response.loc;
			Country = response.country;
			ifconfig = "You :\n\tIP : " + IP + ",\n\tHostname : " + Hostname + ",\n\tCountry : " + Country + ",\n\tLoc : " + Loc; 
			username = Country + ":" + IP;
		}, "jsonp");
	} else {
		ifconfig = "access : http"
	};

	//useragent
	if ( navigator.userAgent.indexOf('iPhone') > 0 ){
		gen = "iphone";
	} else if( navigator.userAgent.indexOf('Macintosh') > 0 ){
		gen = "mac";
	
	} else {
	   	gen = "access : iphone or mac"; 
	  		
	};

	//adblock
	function adBlockNotDetected() {
	    adcheck = "ad : off";
	}
	function adBlockDetected() {
	    adcheck = "ad : on";
	}
	o = ifconfig + "," + adcheck;
	console.log(o);
});