Title: Correct Adsense Code Use
Last modified: July 20, 2021

---

# Correct Adsense Code Use

 *  Resolved [bobsled](https://wordpress.org/support/users/bobsled/)
 * (@bobsled)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/correct-adsense-code-use/)
 * 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](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/correct-adsense-code-use/#post-14680576)
 * Is it okay to use the code in full.
 *  Thread Starter [bobsled](https://wordpress.org/support/users/bobsled/)
 * (@bobsled)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/correct-adsense-code-use/#post-14680581)
 * Okay. Thanks!
 *  Thread Starter [bobsled](https://wordpress.org/support/users/bobsled/)
 * (@bobsled)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/correct-adsense-code-use/#post-14683377)
 * 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](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](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](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/correct-adsense-code-use/#post-14683392)
 * Both approaches are ok.
    If all the ad codes works fine (ads are displayed) then
   you can use only one script.
 *  Thread Starter [bobsled](https://wordpress.org/support/users/bobsled/)
 * (@bobsled)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/correct-adsense-code-use/#post-14683404)
 * 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.

 * ![](https://ps.w.org/ad-inserter/assets/icon-256x256.jpg?rev=1502039)
 * [Ad Inserter - Ad Manager & AdSense Ads](https://wordpress.org/plugins/ad-inserter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ad-inserter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ad-inserter/)
 * [Active Topics](https://wordpress.org/support/plugin/ad-inserter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ad-inserter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ad-inserter/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [bobsled](https://wordpress.org/support/users/bobsled/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/correct-adsense-code-use/#post-14683404)
 * Status: resolved