On Response/ru: Difference between revisions
No edit summary |
Updating to match new version of source page |
||
| Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<div class="mw-translate-fuzzy"> | |||
Подробнее о настройке On Response — в коротком видео: | Подробнее о настройке On Response — в коротком видео: | ||
https://www.loom.com/share/1874474da7414f54be19032682b8e6ca | https://www.loom.com/share/1874474da7414f54be19032682b8e6ca | ||
Если вы хотите сами решать что делать с фродовыми показами, и, например, в зависимости от источника трафика редиректить их на разные URL, вам поможет опция '''onResponse'''. | Если вы хотите сами решать что делать с фродовыми показами, и, например, в зависимости от источника трафика редиректить их на разные URL, вам поможет опция '''onResponse'''. | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
If you want to take control of handling fraudulent impressions yourself, for example, redirecting them to different URLs based on the traffic source, the '''onResponse''' option will assist you. | |||
</div> | |||
'''Обратите внимание, опция доступна только в интеграциях типа ''JS check''.''' | '''Обратите внимание, опция доступна только в интеграциях типа ''JS check''.''' | ||
| Line 19: | Line 25: | ||
= Сигнатура = | = Сигнатура = | ||
<div class="mw-translate-fuzzy"> | |||
Функция принимает на вход объект <code>{ fraud, block }</code>, где ''fraud'' может иметь значение '''0''' (хороший показ) или '''1''' (ботовый показ), а ''block'' может иметь значение '''0''' (хороший показ) или '''1''' (показ был заблокирован с соответствии с настройками интеграции). | Функция принимает на вход объект <code>{ fraud, block }</code>, где ''fraud'' может иметь значение '''0''' (хороший показ) или '''1''' (ботовый показ), а ''block'' может иметь значение '''0''' (хороший показ) или '''1''' (показ был заблокирован с соответствии с настройками интеграции). | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
''fraud'' is '''0''' for a legitimate impression and '''1''' for a bot impression. ''block'' is '''0''' for a legitimate impression and '''1''' when the click was blocked according to the integration settings. ''reason'' is the IVT category behind the verdict, or an empty string. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
''reason'' is one of: <code>Spoofing</code>, <code>Automated</code>, <code>Crawler</code>, <code>Bad reputation IP</code>, <code>Incorrect requests</code>. In statistics, <code>Crawler</code> is labeled Crawlers. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
''reason'' is an empty string in four cases: | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
* the impression is clean | |||
* the impression is suspicious; ''reason'' is filled only for an IVT category | |||
* the impression is a technical loss | |||
* ''block'' is '''1''' because of your IVT Settings (for example VPN, Tor, or proxy), and the impression has no IVT category | |||
</div> | |||
<div class="mw-translate-fuzzy"> | |||
<pre> | <pre> | ||
function(response) { | function(response) { | ||
| Line 35: | Line 63: | ||
} | } | ||
</pre> | </pre> | ||
</div> | |||
= | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
= Interaction with Traffic-back URL = | |||
If you have an integration with both the '''onResponse''' and '''[[Traffic_back_URL|Traffic-back URL]]''' options enabled, keep in mind that '''onResponse''' takes precedence. In this case, the '''Traffic-back URL''' will be ignored. | |||
</div> | |||
[[Category:Features]] | [[Category:Features]] | ||
Revision as of 15:04, 3 November 2026
Подробнее о настройке On Response — в коротком видео: https://www.loom.com/share/1874474da7414f54be19032682b8e6ca
Если вы хотите сами решать что делать с фродовыми показами, и, например, в зависимости от источника трафика редиректить их на разные URL, вам поможет опция onResponse.
If you want to take control of handling fraudulent impressions yourself, for example, redirecting them to different URLs based on the traffic source, the onResponse option will assist you.
Обратите внимание, опция доступна только в интеграциях типа JS check.
Подключение опции
Закажите у менеджера включение опции onResponse на своей интеграции. После того как её включат, реализуйте её логику.
После реализации функции, она появится в поле window.kmnr.onResponse в сгенерированном коде скрипта, который вы можете скопировать кнопкой Copy и разместить у себя на странице в теге <body>.
Сигнатура
Функция принимает на вход объект { fraud, block }, где fraud может иметь значение 0 (хороший показ) или 1 (ботовый показ), а block может иметь значение 0 (хороший показ) или 1 (показ был заблокирован с соответствии с настройками интеграции).
fraud is 0 for a legitimate impression and 1 for a bot impression. block is 0 for a legitimate impression and 1 when the click was blocked according to the integration settings. reason is the IVT category behind the verdict, or an empty string.
reason is one of: Spoofing, Automated, Crawler, Bad reputation IP, Incorrect requests. In statistics, Crawler is labeled Crawlers.
reason is an empty string in four cases:
- the impression is clean
- the impression is suspicious; reason is filled only for an IVT category
- the impression is a technical loss
- block is 1 because of your IVT Settings (for example VPN, Tor, or proxy), and the impression has no IVT category
function(response) {
if (response.block == 1) {
// blocked click
window.location = 'some.url';
} else if (response.fraud == 1) {
// bot
window.location = 'some.url';
} else {
// not a bot
showAd();
}
}
Interaction with Traffic-back URL
If you have an integration with both the onResponse and Traffic-back URL options enabled, keep in mind that onResponse takes precedence. In this case, the Traffic-back URL will be ignored.

