So, I integrated this widget on a test site with no errors showing in the integration - but there were no ads sent. The call to the service was definitely okay though as I see the 200/OK and a simple payload returned,
var a = document.createElement("script");
var b = document.getElementsByTagName("script");
a.async = 1;
a.src = "http://cdn.earnify.com/widget.min.js";
Then use the html:
<div class="earnify-widget" data-widget-id="6095"></div>
Where you would like the widget to show up (pretty much as you have done, already.
The errors on your page were caused by:
– The script tags
– Bad URL in the JS. My version fixes that problem and definitely hits the script you seem to need.
These errors do not appear on my page when implemented the way I describe here. You HAVE to fix those errors (as described here) as your page is absolutely NOT calling out to the service.
Furthermore, I can see that when the page loads (and the 200/OK is returned) the div for the widget gets a data value of ‘loaded’, so its all hooked up (as far as I can see).
Give that a try… see if you get any ads (maybe the calls for the content are constrained to coming from your URL?).
My test page is here:
But that won’t be up like that for long as I don’t want to contest with your widget id. But as you will see there are no errors… just no ads…