Reduce the impact of third-party code Third-party code blocked the main thread for 540 ms

Good Morning.

Could you give me advice on how to get rid of the below error in a page speed test.

Reduce the impact of third-party code Third-party code blocked the main thread for 540 ms

Third-party code can significantly impact load performance. Limit the number of redundant third-party providers and try to load third-party code after your page has primarily finished loading.

How do i load third-party code after the page has primarily finished loading?

Third-PartyTransfer SizeMain-Thread Blocking Time

Shopify
Hosting

1,243 KiB

269 ms

…assets/shopifyCh….js?button_color=…
(cdn.shopify.com)

208 KiB

269 ms

…assets/OnePage.esm.en.9d5d305….js
(cdn.shopify.com)

264 KiB

0 ms

…assets/app.esm.en.3a2e753….js
(cdn.shopify.com)

246 KiB

0 ms

…assets/750.esm.en.da1ab43….js
(cdn.shopify.com)

203 KiB

0 ms

…assets/362.esm.en.de22e43….js
(cdn.shopify.com)

87 KiB

0 ms

Other resources

235 KiB

0 ms

Google Tag Manager
Tag-Manager

166 KiB

233 ms

/gtag/js?id=G-T3NZ7E8CEV
(www.googletagmanager.com)

91 KiB

137 ms

/gtag/destination?id=MC-7KRJT1PKJR&l=dataLayer&cx=c
(www.googletagmanager.com)

75 KiB

96 ms

Facebook
Social

91 KiB

41 ms

/en_US/fbevents.js
(connect.facebook.net)

55 KiB

41 ms

…config/279…?v=2.9.138&r=stable&domain=prettymade.com.au
(connect.facebook.net)

36 KiB

0 ms

Google CDN
Cdn

34 KiB

0 ms

…1.12.4/jquery.min.js
(ajax.googleapis.com)

34 KiB

0 ms

shop.app

3 KiB

0 ms

Google Analytics
Analytics

0 KiB

0 ms

merchant-center-analytics.goog

Try to narrow the scope of question to the minimum possible.

This is a common topic you can research as overall the question is to vague with to many steps to walk someone through on a forum post so you will only get vague overviews.

“How do i load third-party code after the page has primarily finished loading?”

Most of that code coming from shopify assets is injected by {{ content_for_header}} and is not mean to be modified by merchants.

Disable as many apps affecting the frontend as possible such a shopify-chat.

Other scripts depend on how you’ve added them to the theme requiring either a different setup process or theme customization.

If you need an actual performance audit or theme customization then contact me by my email for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

Hello Paul,

Thankyou for responding.

The website is prettymade.com.au