Magento – increase google insights Rank to improve page speed – Magento 2

googlemagento-2.1.7page

I have tried different things to increase their rank on Google insights.

I have installed defer javascript extension which have solved the problem of javascript and increase the rank.

I have enabled minify HTML, CSS, and js from admin panel.

I also enabled the page speed module in php.ini for Apache for bitnami which also help me to improve it.

I have also cached the content for leverage cache through the .htaccess file.

But still, I am on 77 for mobile and 90 for the desktop.

I am getting following issue on google insights.

1: Your page has 1 blocking CSS resources. This causes a delay in rendering your page.

How can I improve this section. Any extension which optimizes the CSS?

2: Leverage browser caching for the following cacheable resources:

https://www.googletagmanager.com/gtm.js?id=GTM-WXRH9TG (15 minutes)
https://www.google-analytics.com/plugins/ua/ec.js (60 minutes)
https://www.google-analytics.com/analytics.js (2 hours)

Anything I can do about the cache of these external links?

3: On our test, your server responded in 0.28 seconds. There are many factors that can slow down your server response time.

Anything I can do about it?

There is one image which is not optimized according to Google insights but I have kept the optimized one but I still getting it in results.

Best Answer

90 is actually a pretty good score for a Magento 1.x or 2.x Desktop site.

With the Pagespeed module working correctly it should remove the css rendering problem. Do you know which version of Pagespeed you are using?

It is always ironic with Pagespeed that the external Google javascript for analytics etc ends up affecting the rank due to the cache settings set by Google. If you Google this issue you will find some workarounds, but they are pretty dirty hacks. If you cannot remove theses services there is not much you can do.

The server response issue can be caused by many different things, server hardware, network, server config, server load, apache/nginx config etc. To ensure that Magento is not causing extra delays you can use tools to debug loading times of magento modules that might affect the time to first byte. You should also look at implementing a varnish cache for Magento 2 which is the recommended full page cache system.

You can download a compressed file from the insights test page which contains all resources that google was able to optimise, including the images. Replace the image google is complaining about with the Google optimised image. Remember you need to wait at least 30 seconds before re-testing a site with the insight tool, as it caches results.

enter image description here

It is possible to achieve 100/100, the screenshot is from my dev site running in Docker containers using

  • NGINX + PAGESPEED
  • Varnish
  • Javascript Defer module

. I don't think a 100 score is necessary. 90 is a good Desktop score, compare your site to other Magento 2 stores and you will see that you are probably higher ranking.

Related Topic