• Resolved bobsled

    (@bobsled)


    When adding code for multiple Adsense ads on posts, should this line be deleted except for the first ad?

    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

    Or is it okay to use the code in full from Adsense for all ads?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Spacetime

    (@spacetime)

    Is it okay to use the code in full.

    Thread Starter bobsled

    (@bobsled)

    Okay. Thanks!

    Thread Starter bobsled

    (@bobsled)

    Just to follow up on this issue.

    I checked using the full code on four ads on a page.

    The Lighthouse Treemap shows the Adsense JS code four times.

    See this screenshot: https://pasteboard.co/KcasqA6y.png

    But if I use the code with only the first ad on a page, there is only one.

    See here: https://pasteboard.co/KcasHmv.png

    You can also see from the screenshots that the file size is reduced from 3.3MB to 1.4MB.

    So is it okay (or better) to use the Adsense script only once? And are there any issues or drawbacks with this approach?

    Plugin Author Spacetime

    (@spacetime)

    Both approaches are ok.
    If all the ad codes works fine (ads are displayed) then you can use only one script.

    Thread Starter bobsled

    (@bobsled)

    Okay, thanks. I’m hoping that using only one script will help improve loading speed a little.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Correct Adsense Code Use’ is closed to new replies.