Using klaviyo with shopify; a performance disaster that hurts rankings

  • 11 May 2021
  • 3 replies
  • 206 views

Badge

Does anyone know the right way to install klaviyo on a shopify store that optimises performance? I've complained to Klaviyo that loads of scripts are installed and it impacts performance (a big no-no now that Google launched web vitals especially) and they send me to this page. But that method still injects loads of scripts, and doesn't even sync a shopify customer list with klaviyo profiles.

Specifically that method adds 8 scripts and 1 stylesheet (and this is without the shopify app intalled)
Tests before and after saw my store drop from 88 to 48 in google page speed insights (desktop) and from a B (88%) in GTMetrix to a D (56%).

It's just not sustainable to have this impact on performance and I'm reaching the end of my journey with Klaviyo unless someone can add some input to help.

Thanks!


3 replies

Userlevel 6
Badge +5

Hello @dilby,

I completely understand how frustrating this sort of experience can be in seeing your store’s page speed report drop from a score of 88 to 48. 

After manually installing the Klaviyo.js have you had a chance to review your Shopify integration settings and ensure that the Automatically add Klaviyo onsite javascript (recommended) setting has been disabled? If this setting was still enabled within your Shopify integration settings after also installing the Klaviyo.js manually, this would cause a duplication of the Klaviyo javascript present on your website. We would only recommend having one form of this installation method; either allow Klaviyo to automatically inject the snippet to your site, or through manually installing the snippet onto the site yourself. 

On top of the How to Install klaviyo.js for Shopify Stores article have you had a chance to taking a look into the Klaviyo.js and Site Speed Reports article? 

As detailed in that article, Klaviyo’s JavaScript is loaded asynchronously and would not prevent aspects of your site from loading. However, Google’s PageSpeed Insights and other site speed reports may still flag it as a contributing factor in your site’s load times.

This topic has been brought up several times within our Community such as the ones below. Echoing @cassy.lee’s response within them, our team is currently investigating ways to improve our javascript performance and prioritizing work in this area. We currently do not have any updates yet regarding this topic. However, once we have any news or updates from our internal teams, we’ll be sure to post and comment in this thread to communicate with all our Community members. 

Thanks for being a part of our Klaviyo Community!

-David

Badge

Thanks for the reply @david.to - However yes I have disabled that (already been through this with other colleages) and all these scripts still show. For me this probably makes me more confused why there is no expected bahaviour published or why there’s no direct comment or info in articles about exactly what scripts are meant to be seen. I have manually added the one script as per below:

<script async="" type="text/javascript" src="//static.klaviyo.com/onsite/js/klaviyo.js?company_id=xxxxxx"></script>

However it injects all the other scripts mentioned. In fact asking to not automatically add on-site javascript in the shopify app seems to make no difference. Do you have any information on the exact difference I’m meant to see?

The links to the articles you’ve included at the end of the post just reiterate my points and end with yourselves saying you need to do better. I’m aware scripts are async, but in a world of Web Vitals, klaviyo is actively lowering site conversions, and is unsustainable.

 

Userlevel 6
Badge +5

Hello @dilby,

Thanks for that confirmation!
There actually would not be any visual differences between manually installing the Klaviyo.js or allow Klaviyo to automatically inject the Klaviyo.js onto your site. Both options carry with them several lines of scripts needed to trigger certain Klaviyo functions such as allow Klaviyo signup forms to publish, triggering the Active Onsite event, triggering the Viewed Product event, etc. 

Manually installing the Klaviyo.js versus automatically injecting the Klaviyo.js will alleviate some extra resources required to pull from the injected script. 

I concur with you that there is always progress to be made in this venue. Our team is definitely looking to improve how our onsite JavaScript experience performs and we’re investigating methods to improve that experience. 

I’ll share this feedback you’ve provided to our Product Team to further help them remedy this situation. We truly appreciate the feedback that all our Community members can share with us as it provides context to our teams to gain more insight into areas we can improve.

Once again, we truly appreciate you sharing your experience and feedback with our Klaviyo Community.

David

 

Reply