Google Pay & Paypal Pagespeed issue

Highlighted
Shopify Partner
3 0 0

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

0 Likes
Highlighted
Shopify Partner
248 9 58

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.

1 Like
Highlighted
Shopify Partner
3 0 0

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.

0 Likes
Highlighted
New Member
7 0 0

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

0 Likes