Once your Bitsight Badge is configured, get the badge embed code [ Bitsight Badge ➔ Copy Embed Code] and provide it to your website development team to add to the relevant webpage. Once the webpage is updated, the badge will immediately load and appear on your webpage.
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 to trust.bitsighttech.com
.
- August 24, 2022: New configuration options.
- June 29, 2022: Published.
Feedback
0 comments
Please sign in to leave a comment.