This page should display a Google ad.
I Tried everything but it’s not working. I think that the problem is with the closing script tag – </script>.
Can you please copy the source code and test it?
I really couldn’t make the ad appear till now even if it’s working outside the javascript code.
You have a
</script>embedded inside a JavaScript string literal which is interpreted as the end of<script>tag by the browser. There are simple workarounds, the simplest one is to split any</script>present inside a string literal using the+sign:Looking at your page however, I doubt if the above changes will be enough. Instead of using
.innerText:document.createElementto create a div (and script) elementelement.appendChildto append that div inside another element