jQuery(document).ready(function($) { if(document.referrer.indexOf('http://сайт.рф') >= 0){ //код который нужно выполнить }; });