function(response) { if (response.fraud == 1) { // bot window.location = 'some.url'; } else { // not a bot showAd(); } }