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 blackCrowScoresUpdateBinding = {
app_name: 'audience',
bind: 'scores_update',
callback: scoresUpdateHandler,
timeout: setTimeout(function() {
blackCrowScoresUpdateBinding.timeoutReached = true;
// handle failure state as desired
scoresUpdateHandler('err');
}, 3000)
};
window.blackcrow.push(blackCrowScoresUpdateBinding);
function scoresUpdateHandler(scoreObj) {
console.log(scoreObj);
}
</script>
Please notify a Black Crow team member to enable this feature once you have integrated.