Подключил РСЯ (рекламная сеть яндекса), нужно делать замену скрипта, если посетитель из Украины.
Код РСЯ отдает ошибку
GET https://an.yandex.ru/system/context.js net::ERR_NAME_NOT_RESOLVED
Мне нужно, что бы скрипт, в случае ошибки выполнял сценарий Y
Код РСЯ
(function(w, d, n, s, t) {
w[n] = w[n] || [];
w[n].push(function() {
Ya.Context.AdvManager.render({
blockId: "R-A-382314-1",
renderTo: "yandex_rtb_R-A-111111-1",
async: true
});
});
t = d.getElementsByTagName("script")[0];
s = d.createElement("script");
s.type = "text/javascript";
s.src = "//an.yandex.ru/system/context.js";
s.async = true;
t.parentNode.insertBefore(s, t);
})(this, this.document, "yandexContextAsyncCallbacks");