Javascript Widget Help

Hello, I’m trying to add a simple crypto-coin price chart widget. I’ve tried through the Embed html iframe and html site with no success. It takes the code but nothing happens in preview mode. It’s a very simple widget that just displays the current price and a little chart that shows the 24hr trend. I have not published my site yet so I haven’t tried through the analytics section, but that seems like a global area anyways and this widget should only show up on the specific page, not site wide.
The code is below. Any assistance would be greatly appreciated!


  <script type="text/javascript">
baseUrl = "https://widgets.cryptocompare.com/";
var scripts = document.getElementsByTagName("script");
var embedder = scripts[ scripts.length - 1 ];
var cccTheme = {"General":{"borderColor":"#0b4d82"},"Header":{"background":"#0b4d82","color":"#fff200","displayFollowers":false},"Chart":{"fillColor":"#68d4ff","borderColor":"#2a0ebf"}};
(function (){
var appName = encodeURIComponent(window.location.hostname);
if(appName==""){appName="local";}
var s = document.createElement("script");
s.type = "text/javascript";
s.async = true;
var theUrl = baseUrl+'serve/v1/coin/chart?fsym=BTC&tsym=USD';
s.src = theUrl + ( theUrl.indexOf("?") >= 0 ? "&" : "?") + "app=" + appName;
embedder.parentNode.appendChild(s);
})();
</script>