August 24, 2022: Updated for new configuration options.
Embed Code Example
<div id="bitsight-widget"> </div> <script> const div=document.getElementById("bitsight-widget"); const req=new XMLHttpRequest(); req.open("GET","https://trust.bitsighttech.com/rating/(company guid)"); req.onload=function(e){if(req.readyState===4){if(req.status===200){const {response}=req; div.innerHTML=response; } } }; req.send(); </script>
Badge Specifications
- The size and layout of your badge are determined by your choices on the Badges tab.
- The first line of the embed code (
<div id="bitsight-widget"> </div>
) establishes a container and sets the location of the badge. Place this line of code wherever you want the badge to appear on the webpage. No additional formatting is needed for the badge to work, but you may need to adjust the dimensions of your page. - The code between
<script>
and</script>
is javascript and not HTML. - The remaining lines of code (
until req.send()
) are used to create a request object, give it instructions on how to handle the response, check the response to see if it is good, and finally send that request totrust.bitsighttech.com
.