Optimize your Website’s Images, JavaScript and CSS using Analytics and PageSpeed Insights

page speed

Page speed as indicated by Google is one of the ranking signals used by its algorithm to improve your ranking and conversion. If not optimized, this will affect your indexation rate negatively since the allocated crawl budget can crawl fewer pages only. Also, pages that takes longer time to load tend to have higher bounce rates and will harmfully affect conversion rate. That is why a website with optimized load speed rank faster and convert better.

There are many ways on how you can check your page speed score; whereas you can use different SEO tools online. But optimizing it is a different scenario. Here I’ll show you how to check your images, JavaScript, and CSS files and ways to fix them in order to improve the speed of individual pages using the PageSpeed Insights tool and Google Analytics.


1. Check Speed Suggestion in Google Analytics

Make sure that the Analytics Tracking Code is installed and that proper tracking is in place. Then, access the Speed Suggestion under Behavior –> Site Speed –> Speed Suggestions.

Here you can see the following:

Speed Suggestions

  • Page – pages visited listed by URL
  • Pageviews – Total number of pages viewed
  • Page Load Time – Average amount of time (sec) for the page to load
  • Page Speed Suggestions – Total number of recommendations (PageSpeed Insights)
  • Page Speed Score – Indicates the extent to which you can improve the load time

You can disregard the Page Speed Score for now. We’ll focus more on optimizing the Avg. Page Load Time.

In the example, the average load time of the homepage (/) is 8.07 sec wherein the recommended load time should be an average of 2.0 sec or less.

homepage load time


2. Click the Page Speed Suggestions

Clicking the total number of Page Speed Suggestions will point you to PageSpeed Insights in a new window, where you can check the summary of errors and how to fix them. In this example, I’ll optimize only the homepage in Desktop version.


PageSpeed Insight


By clicking the Show how to fix link, this will show you more detailed information on how to fix such errors. But most of these are jargon and are not clear for a “not so techy” website owner. So I advise that you’ll ask a help of a Webmaster or web developer.

suggestions summary


3. Download the Optimized Files

Now you’re able to see the list of errors for your page speed, it’s time to fix them!

Below the Passed Rules, you’ll see the Download optimized image, JavaScript and CSS Resources section. Click one in the list and you should be able to download a zip file.

Passed Rules


Extracting the zip folder will provide you all the optimized files for CSS, JS and Images that you’ll need to upload in your website.

zip file


4. Fixing the errors & uploading the files

Now, here’s the techy part of the optimization. Make sure to ask for help of a Webmaster or web developer if you’re not sure of what you’re doing.

Access your CPanel or FTP account to upload the file.

In this case, I used the CPanel and accessed the File Manager. Locate all the files source that you need to replace inside the public_html folder. But, make sure to BACK UP all the original files first that you’re going to replace (always consider this as a good practice in case something went wrong to the site).

File Manager


The extracted folder from PageSpeed Insights contains all the files but it doesn’t mean that it was in the same folder source inside the CPanel. If you’re having trouble locating the file source, just click the Show how to fix link. For example, here are the source locations for the images:

Optimized Images


After all the optimized files are uploaded, positive results should reflect inside your Google Analytics.


There you go! You’ll notice that the load speed of the homepage has significantly improved from 8.07 sec to 2.40 seconds! And the Page Speed Score increase from 70 to 85. The two remaining suggestions are the cache files that can be optimized using a WordPress plug-in like W3 Total Cache.

And that’s it. Optimizing your page speed is really important no matter how you measure it, the faster the website is, the better.

You can always access the PageSpeed Insights website to check the files that needed to be optimized even without Google Analytics. But, I still would prefer if you had Google Analytics so you can easily track the changes in your pages’ load time. You can read the full documentation of PageSpeed Insights here.

Elzer John Ramos is a Senior SEO Analyst in one of the leading Digital Marketing agencies in the Philippines. For three years of experience, Elzer has tried and used different methodologies that have produced results and pushed websites up the rankings. His vast experience ranges from keyword research, link building, in-depth site audits to SEO technical setups and implementations.
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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