Audience Callback

Now that you have integrated and our model has started producing predictions, you can begin to ingest scores into your internal systems.

Utilize Black Crow’s global interface to receive updated scores

If you wish to ingest scores, Black Crow allows you to pass in a callback function that will execute once the score is generated. Please see the below example:


<script>
window.blackcrow = window.blackcrow || [];

var blackCrowScoreUpdateBinding = {
    app_name: 'audience',
    bind: 'score_update',
    callback: scoreUpdateHandler,
    timeout: setTimeout(function() {
        blackCrowScoreUpdateBinding.timeoutReached = true;
        // handle failure state as desired
        scoreUpdateHandler('err');
    }, 3000)
};

window.blackcrow.push(blackCrowScoreUpdateBinding);

function scoreUpdateHandler(scoreObj) {
    console.log(scoreObj);
    // {score: '1'} or ‘err’ if timeout was reached
}

</script>


Please notify a Black Crow team member to enable this feature once you have integrated.

Let’s simplify & automate your marketing campaigns

Contact Us