A
A
Alexander Osadchy2020-06-09 09:43:25
WordPress
Alexander Osadchy, 2020-06-09 09:43:25

How to connect external scripts in WP so that it does not affect Google's PageSpeed?

Hello!

I have a task to raise the rating of the wp site on pagespeed google .. it’s not a very fun activity)

PageSpeed ​​most of all swears at external scripts fbevents / analytics, etc.
5edf2eec6a08a617517841.png
5edf2ef508b16086595461.png

On Google, I came across this post: https://qna.habr.com/ q/492068 ..there a person described how to reconnect these sprits locally...only I didn't really understand the process of including the created php file in wp - can you help with this please?

And in general - is it possible to get the mobile version of a site on WP up to 90+ in pagespeed google?

The site is not news, the site of the company (simple landing + nested pages)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anita Kovaleva, 2020-06-09
@Anitamsk

And in general - is it possible to get the mobile version of a site on WP up to 90+ in pagespeed google?

Perhaps, but not on wp (if you don't preload all scripts or don't throw them in the footer). Plus points 15-20 you will eat analytics out of the blue.
First of all, google points are for the paranoid.
Secondly - what the hell is your 147kb compressed autooptimize js file weighing? You did everything on plugins and now you are trying to get this locomotive off the ground?
Test the site on gtmetrix.com - throw the results of the test with a waterfall that shows which files are being loaded, and how things are in general with optimization, which TTFB, etc. Better throw a link with the test here.

E
Eugene Chefranov, 2020-06-09
@Chefranov

There are a couple of options:
1. Remove external analytics scripts (do not use analytics)
2. Pull external scripts by cron and load them locally, the Clearify plugin can partially do this, but it’s probably better to write the function yourself.

And in general - is it possible to get the mobile version of a site on WP up to 90+ in pagespeed google?
It is possible, I reached this score without any problems (example: link in profile)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question