You’ll need to add a couple of code to your website’s HTML. If you already know how to edit HTML, just follow these simple steps:
To post a user profile badge on your website:
- Add the username of the person for whom you’re creating the badge to the following snippet of code:
<buzzdata:user username="username"></buzzdata:user>
Example:
<buzzdata:user username="sarah"></buzzdata:user>
Insert this snippet of code into the HTML of your web page in the area that you want the badge to appear (that is, somewhere within the <body> and </body> tags).
- Now, insert the JavaScript into the HTML of your webpage within the
<body> </body>element, just before the closing tag</body>. Also ensure that it does not disrupt existing code blocks.
<script type="text/javascript">
(function() {
var bd = document.createElement('script'); bd.type = 'text/javascript'; bd.async = true;
bd.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'badger.buzzdata.com/badges.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(bd, s);
})();
</script>
To post a dataset badge on your website:
- Add the part of your dataset's URL that comes after "http://buzzdata.com/" into the code snippet below:
<buzzdata:dataset dataset="dataset-owner-username/dataset-name"></buzzdata:dataset>
Example:
If the dataset you want is found at http://buzzdata.com/eiu/eiu-commodity-price-forecasts then the first code snippet would be:
<buzzdata:dataset dataset="eiu/eiu-commodity-price-forecasts"></ buzzdata:dataset>
Insert this code to your web page HTML in the area that you want the badge to appear.
- Place the following piece of JavaScript into the HTML of your web page within the
<body> </body>element, just before the closing tag</body>. Ensure that it does not disrupt existing code blocks.
<script type="text/javascript">
(function() {
var bd = document.createElement('script'); bd.type = 'text/javascript'; bd.async = true;
bd.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'badger.buzzdata.com/badges.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(bd, s);
})();
</script>
If you would like to post multiple badges on your website, follow step 1 for each badge, but then add the JavaScript snippet in step 2 only once.
If you still need help, contact us at support@buzzdata.com.
You can go back to Add a BuzzData badge to your website or back to the main FAQ.