Edit your home page, drag it to the end, in
Src="ad.js "here explains that it must be placed in the same directory as your web page. If it is not in the same directory, such as in the js folder in the same directory, then src="js/ad.js "should look like this.
It mainly depends on how your catalogue is distributed. If not, ask again.