Im trying to load ads on a rails 4 site and keep getting the following error
onejs?MarketPlace=US&adInstanceId=xxxxxxxx&storeId=xxxxxxx:1 Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.
If I refresh the page the ad loads just fine. Here is the ad code from amazon which is places in a show.html.erb file.
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=xxxxxxxxx&storeId=xxxxxxxx"></script>
If I use the amazon ads with Iframe code there is no issue but this format ad doesn't have an iframe option (It's the Native Ads - scans page for relevant content to display ads)
Its a rails 4 site with turbolinks enabled on heroku. I'm at a total loss as to how to fix it. This is also happening with adwords and media.net ad.
Any idea how to solve?