DEV Community

Indian Train
Indian Train

Posted on

How to add Google Adsense code in angular 9 application?

I have added Google Adsense to my angular site. It shows ads on some pages and doesn't on some pages. I will show the example of pages which doesn't shows ads, suppose we go to this page "https://www.indiantrain.in/train-time-table", in the search box we have filled the train number and hit get schedule button. It will redirect to other page. Almost all the features of my site is in this manner only. I think angular block the Adsense script and that's why it doesn't load all the time. As we already know, outside script need to sanitize in order to run in angular. So, I just want to know the proper way to add Google Adsense to my site.

Top comments (0)