• Resolved nealbo

    (@nealbo)


    Hi there,

    Looking at my pagespeed report I can see that https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js is loaded individually 8 times at 156KB each, totaling 1.24MB, which shows as 48% of the total size of the loaded page.

    Is this expected that each ad unit js is loaded afresh, seperately multiple times per page? I would have expected a single initial download of the js rather than repeatedly being referenced and used again each time seperately.

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

    (@spacetime)

    Hello,

    this question has nothing to do with Ad Inserter. The plugin inserts the codes you configure. If you configured 8 ad codes with this adsbygoogle.js script then the script will be dowloaded that many times – unless it is cached (e.g. by the browser). Of course, only one instance is loaded in the DOM.

    However, this script is external – hosted on google, it is not part of the HTML code of your website – therefore it does not contribute to its size.

    Thread Starter nealbo

    (@nealbo)

    Thanks for the quick reply, I appreciate it. Yes, I was coming back here to say that I’d discovered that I’d accidentally included the js part of the code in the blocks rather than once in the head causing it to be repeated by ad inserter.

    From a user perspective, it does have something to do with ad inserter though, or rather the way it injects code. I understand that it was my error but not everyone who uses your plugin is aware of the ins and outs of how it works or how it injects ad code as you of course are.

    And regarding the page size, Google Page speed insights and Lighthouse disagree with you on that one. Of course, the contents of the JS are not part of the actual code of my page, but users experience the same effect of increased “page” size and page load time. Removal of the duplicates has significantly upped my load times.

    I love your plugin and am very grateful that you made it and offer it for free, but reading some of your support comments here, and your comment to me above, you seem more bothered about semantics than assisting which is a shame.

    Plugin Author Spacetime

    (@spacetime)

    Well, I tried to answer your questions. The plugin inserts the code(s) you configure – this is what it does. But in principle, how ad scripts are included into the page has nothing to do with Ad Inserter. You can insert ad code(s) any way you like (hardcoded in PHP files, ad code in widgets, etc.) – the result will be the same. This page explains how Ad Inserter works:
    https://adinserter.pro/faq/how-ad-inserter-works

    Regarding page size and ad scripts: again, this has nothing to do with the plugin. It inserts the codes as configured. It is up to the measuring tool how it counts scripts. And it is up to you to decide which ad codes will be inserted and where. One of the basic principles of Ad Inserter is “what you see is what will be inserted” – the code you see in the blocks will be inserted into the page. Maybe you can ask on some AdSense support forum for explanation on how to optimize ad codes.

    I’m glad that you like the plugin. But I’m not sure what you mean by “semantics”. Please understand that I can mainly help you and other users regarding Ad Inserter. I can’t help regarding ad codes and issues with ad networks. Many users report issues that have nothing to do with the plugin, e.g. empty or blank AdSense blocks (Google is not serving ads). This has nothing to do with the plugin and is also clearly documented. In such case I can manily check if the blocks (ad codes) are properly inserted.

    Thread Starter nealbo

    (@nealbo)

    What I mean by semantics is:

    “This has nothing to do with ad inserter” – while it is true that it was my error, it is a query about a problem that was encountered while using the plugin. “Technically true” statements/arguing over semantics in a dismissive way like that doesn’t help anyone. Support doesn’t just need to be about technical issues with your product, it can be to help guide users into how to use your product correctly/effectively. Your second reply did exactly that, which I appreciate.

    That’s just my 2 cents anyway and hope that it’s not taken in a negative way.

    Cheers,

    Plugin Author Spacetime

    (@spacetime)

    Thank you very much for the clarification. I will try to improve my answers.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Ad code showing 8 times leading to large page size’ is closed to new replies.