Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi All,
I'm working on improving the page speed for a store and noticed that one of the biggest bottlenecks on load are the google pay and PayPal scripts (which load in on every page since the buttons are in the cart).
The buttons get loaded in through {{ content_for_additional_checkout_buttons }} in Liquid. Is there a recommended way to load these buttons in dynamically (so it can be done after the whole page has been loaded)?
Many thanks
I saw this same issue. We had amazon pay and paypal enabled. Amazon would load a bunch of other resources as well, a ridiculous amount of stuff just to be able to add a button that transmits some cart details. And as you say it loads on EVERY page. Technically it should only be needed in the cart but they have to account for the fact a theme could have a popup cart or mini cart that is on every page with that button on it. It does add quite a hog to the page.
What we did is went into reports and looked up financial reports, there's a way there to see which types of checkouts produces what dollars, and then you can decide whether it's really worth having those extra payment methods enabled. For us amazon turned out to be no more than like 9% while paypal was like 30%, so we ditched amazon and gained 1/2 to 1 second load time on 1.5mbis/dsl/3G.
It's unfortunate that these scripts are so hefty given the tiny amount of work they should be doing. Amazon for example even loads some stupid A/B testing script. It's possible that shopify doesn't have control over what scripts and resources are loaded by these plugins.
We actually ended up doing a similar thing, went through our reports and are now in the process of disabling Google Pay.
As you said, It's a shame that there isn't another solution at the moment since it loads in on every page through the basket.
we turned off google pay as our reports show it handles 1.5% of transactions but slows down every page
page speed went from 56 to 67 aka 20% improvement
Hello, Am a professional Shopify developer. Am here to make your site super crazy.
contact me on Fiverr so i can start working on your Shopify store,
contact link: https://www.fiverr.com/share/aeVAdp
Same issue discovered this morning and as Paypal is responsible for a fair share or sales, we couldn't just switch it off (as much as I wanted to to fix the issue).
To be pro-active as Shopify are unable to assist at all with this matter being a 3rd-party, I have created a support ticket with Paypal Merchant Support regarding the duplicate Paypal Script (checkout.min.js) loading site-wide.
I will do my best to keep the thread updated.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024