Following popular demand, we’ve rolled out version 1 of our new Website Carbon Badge.
The badge can be added to the footer of any website to automatically calculate and display the carbon emissions of each page. We hope that the badge will further increase awareness of web carbon emissions by allowing any website to display a live calculation of its carbon emissions.
We are conscious that the badge itself has an impact on carbon emissions and so we have designed it to be as lightweight as possible. The code and the results from our API are all highly optimised and cached on repeated loads.
It’s really easy to install it on your site, just add the following lines to your template wherever you’d like the badge to appear:
<div id="wcb" class="wcb carbonbadge"></div> <script src="https://unpkg.com/website-carbon-badges@^1/b.min.js" defer></script>
For more information, such as how to enable the dark theme, or to contribute to the project, check out the wiki.