insert <script> into angular component

Viewed 22

i'm programming my website's frontend in Angular. I use altervista as hosting and i try to insert the altervista banner into my website. This is the banner:

<script>!function(d,l,e,s,c){e=d.createElement("script");e.src="//ad.altervista.org/js.ad/size=300X250/?ref="+encodeURIComponent(l.hostname+l.pathname)+"&r="+Date.now();s=d.scripts;c=d.currentScript||s[s.length-1];c.parentNode.insertBefore(e,c)}(document,location)</script>
If i insert the banner in index.html after "app-root" first "/body" it works but appear in the botton of website. Can i insert the script into a component and show the banner wherever i want?

0 Answers
Related