Show different ads on different categories

@Windsooon

You can add your code in the footer (or above the end body tag) in your themes or you can add it in the footer (or above the end body tag) in a theme component and apply that to your themes. The choice is yours.

The DOM selectors will be different based on the page where you are displaying the ads.

Actually, you should keep the bulk of the code in your favorite web site and just add the link to load the Javascript into your theme or theme component, or at least that is how I normally do these things.

Personally, I find jQuery works better for DOM selection in themes, but I’m sure that is because I have more experience with jQuery selectors compared to plain vanilla JS selectors.