#How to better optimize google scripts? - resolved

7 messages · Page 1 of 1 (latest)

cerulean canyon
#

Hello,
I don't know how many of you have come across this problem, one of me is grinding me quite badly...
Code: https://prnt.sc/GXySnTNipByt
I cannot optimize the scripts from: google analytics, Tag manager and Facebook pixel.
I get score 68 - 70 on phone because of the 3 scripts. https://prnt.sc/YhU14EmT3Xr7

How did you proceed?
Thank you!

Lightshot

Captured with Lightshot

Lightshot

Captured with Lightshot

drowsy cairn
#

You can't change code imported from 3rd parties

drowsy cairn
cerulean canyon
# drowsy cairn Maybe try the `lazyOnLoad` strategy?

well...I also use useEffect for the action that the user takes on the website, but it enters faster and gives an error that it does not find a function from the facebook script.

I didn't think to delay the functions in useEffect, until you write to me about lazyOnLoad🤦‍♂️ .

Now i am back to score 99.

Thanks mate! 🙂

Textme if i could help you with something

#

How to better optimize google scripts? - resolved

grim scroll
#

@cerulean canyon i still didn't get how you resolved the issue. Can you please elaborate. I am facing the same issue.

Thanks

cerulean canyon