Created
November 16, 2021 05:04
-
-
Save shaley84/2e80415b95b91a1a138cd79db56c0e56 to your computer and use it in GitHub Desktop.
BlackCrow Assignment - Sara Haley
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,'script','dataLayer','GTM-TSFWMGP');</script> | |
<!-- End Google Tag Manager --> | |
<title>BlackCrow Assignment - Sara Haley</title> | |
</head> | |
<body> | |
<!-- Google Tag Manager (noscript) --> | |
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TSFWMGP" | |
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | |
<!-- End Google Tag Manager (noscript) --> | |
<!-- BlackCrow AI Callback --> | |
<script> | |
document.body.style.background = "skyBlue"; | |
window.send_blackcrow_scores = true; | |
window.addEventListener('blackcrow_score', (e) => { | |
console.log(e.detail.score); //{score: 4} | |
if (e.detail.score < 4) { | |
document.body.style.background = "red"; | |
} | |
else if (e.detail.score >= 4 && e.detail.score <=7 ) { | |
document.body.style.background = "yellow"; | |
} | |
else if (e.detail.score > 7) { | |
document.body.style.background = "green"; | |
} | |
}); | |
</script> | |
<!-- End BlackCrow Audience Callback --> | |
<h1> How Likely Users Are to Buy?</h1> | |
<p>We have developed this page to show you how | |
likely a user is to buy your product! </p> | |
<p>The background-color will change to:</p> | |
<p><b>GREEN</b> if a user is very likely to buy</p> | |
<p><b>YELLOW</b> if a user could be persuaded either way and </p> | |
<p><b>RED</b> if a user is very unlikely to buy.</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment