Adsense

How to Speed up Google Adsense Website, Easy Method

Google’s latest core web vitals update will start affecting search results. And your website’s PageSpeed insight score too low? Then you have to worry about it. Now you can improve page speed and maintain your SERP or lose it. There may be multiple factors responsible for slow page speed. But in this article, we will discuss how to speed up Google AdSense implemented website.

Google Adsense is a powerful tool for monetizing your website and generating revenue. However, slow page loading speeds can negatively impact your Adsense earnings by causing visitors to leave your site before the ads have a chance to load.

And if your site speed is good, but the site speed decreases after adding the Adsense ads code? You don’t have control over the AdSense server to optimize them. So what is the alternative?

Adsense slow down website Speed issue solved.

And also, you want to make revenue with a good user experience on the website to grow the website. You have to take care of Adsense ads and the website’s speed.

How To Properly Check Website Speed Performance?

There are many free and premium tools available to check the website speed. You may already know of Google Page Speed Insights, GTmetrix, Pingdom Tools, etc. But the critical question here is, which page speed should you check?

Some users check the speed of the homepage of their website and are done, but it’s not done, dear. You’ve to check the page speed of all the pages and post types available. But sometimes, It is not practically possible to check the speed of all posts and pages. The solution to this is to check the

  • Homepage speed,
  • Pick a BlogPost for pagespeed insight score test,
  • Speed of a random Page of the website.

Suppose you’ve other pages like product pages or custom blog posts containing media, iframes, etc. You can perform a speed check for those pages as well. You can check the speed of all these pages before and after adding Adsense ads.

Speed up Google AdSense for the website.

My website speed before applying AdSense was 95+ for mobile and 100 for desktop devices in the PageSpeed Insights tool. But as I added the Adsense ads, it reduced to 30 to 40 for mobile and 80 for desktop. I’m running Blogger blogs and WordPress websites and want a proper solution.

When we generate an Adsense ad, it will look like the following.

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Large Rectangle -->
<ins class="adsbygoogle"
 style="display:inline-block;width:336px;height:280px"
 data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
 data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

In the above code, the adsbygoogle.js file starts loading asynchronously with the content without blocking the content from loading. This causes a delay in loading the content, and hence website takes more time to load.

But what we are going to do with this script is ads will be loaded after the website is ready to interact with the user. And when the user scroll, click, or after 5 seconds of no input.

First, we’ll remove the adsbygoogle.js from all the page ad units, as shown below.

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

All the ad blocks should look similar to this. We’ve chosen an ad block of size 336×280 for mobile and desktop devices.

<!-- Large Rectangle -->
<ins class="adsbygoogle"
style="display:inline-block;width:336px;height:280px"
data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

You can add the following script to your website’s footer section to boost its PageSpeed insight score. But it would be best to avoid auto-responsive ads as this will result in a substantial cumulative layout shift score. You can also serve responsive Adsense ads.

<script id='flying-scripts' type='text/javascript'>const loadScriptsTimer=setTimeout(loadScripts,5*1000);const userInteractionEvents=["mouseover","keydown","touchstart","touchmove","wheel"];userInteractionEvents.forEach(function(event){window.addEventListener(event,triggerScriptLoader,{passive:!0})});function triggerScriptLoader(){loadScripts();clearTimeout(loadScriptsTimer);userInteractionEvents.forEach(function(event){window.removeEventListener(event,triggerScriptLoader,{passive:!0})})}function loadScripts(){document.querySelectorAll("script,iframe[data-type='lazy']").forEach(function(elem){elem.setAttribute("src",elem.getAttribute("data-src"))})}</script>

Below this script, paste the Adsense ads serving script in the same format as displayed below. We’ve changed src to data-src to load the Adsense ads after the user interaction. Please note that you’ve to remove the following lines all ads block instead of all those. Paste the following

<script data-ad-client='ca-pub-XXXXXXXXXXXXXXXX' data-src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js' data-type='lazy'></script>

The WordPress user can add the following code in the footer section using the theme panel. If the theme doesn’t support custom javascript to the footer, then add it manually. For this, go to appearance>theme>edit theme and then find footer.php. Now paste the above scripts(both) before the </body> tag. To keep these changes even after theme updates, use a child theme. Try creating a child theme for your WordPress website.

Blogger users can edit the Blogger theme and paste the above script into the theme file above the </body> tag. After doing so, you can check the website speed. You can also read our guide to boosting Blogger’s blog speed.

Optimize other Page Resources

Here are some tips for how to speed up your Google Adsense website:

  • Optimize images: Large, unoptimized images can slow down your website server. Make sure to compress images before uploading them to your site, and use the proper image file format as per need (such as JPEG or PNG) for each image.
  • Minimize HTTP requests: Every time a page loads, it requests multiple times to the server for different page elements. Minimizing the number of requests by combining files, such as CSS and JavaScript, can help speed up the page loading time.
  • Use Content Delivery Network (CDN): A CDN stores a copy of your website on multiple servers in different regions. This helps to reduce the distance between the server and the user, leading to faster page loading times.
  • Use browser caching: Enabling browser caching allows your website to save some aspects of the page, such as images and CSS, to the user’s computer. This reduces the number of requests the browser needs to make to the server, which speeds up the page loading time.
  • Minimize ad codes: Too many ad codes on your website can slow it down. Use them wisely and optimize them properly.
  • Use Accelerated Mobile Pages (AMP): AMP is a Google-backed project aiming to speed up web pages’ loading times on mobile devices. Using AMP, your website’s pages load much faster on mobile devices, resulting in a better user experience and potentially increased Adsense revenue.

Implementing these tips can speed up your Google Adsense website, provide a better user experience for your visitors, and potentially increase your Adsense revenue.

I hope you find this article helpful; in case of any doubt, queries, or feedback, feel free to ask in the comment section provided below. Thank You!

Ashok Sihmar

Ashok Kumar working in the Search Engine Optimization field since 2015. And worked on many successful projects since then. He shares the real-life experience of best SEO practices with his followers on seoneurons.com. You also can learn Advance level SEO for WordPress, Blogger, or any other blogging platform. Stay tuned.

12 Comments

  1. I am noticing this script is requiring a double-tap on the first time a link on the page is tapped on mobile devices (tested with iPhone, Safari). Works fine on my desktop testing.

      1. hi bro
        how are you ?
        you say :
        “This script activate Adsense on user interaction.”

        And you, I think, are using the same system on your site

        How was the user experience report? Did you notice any glitches when using it?
        Please reply as soon as possible
        My greetings

  2. Your tips are great and very helpful. I slowly started removing Adsense from some of my sites. Maybe your solution will let me keep them. In generally, Google should adapt their ads codes to its own requirements. This is difficult for users. You do the job for them. Best Regards and thank You.

  3. Dude, it’s very informative for us who loves blogging and reading articles on the internet but I have a question can I do the same things in blogger auto ads. I try lots of things but did not increase my website speed. I’m using auto ads in blogger, help me out. Thanks, bro…

  4. Dear Mr. Kumar, is it possible to have the same code without the timer function. that only the mouse function is valid?

  5. Hello! How to proceed if the Adsense code is integrated into the site via SIteKit. I can’t find the Google code in any of the wordpress theme files?

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button