before I installed Klaviyo, I wouldn’t say my site was perfect, but I would get a healthy B grade from pagespeed etc.
Now I get an F, and the only reason for that is Klaviyo’s javascript taking 9 seconds to load. Even loading Asynchronously, which appears to be the stock answer, it is the longest loading part of the page load.
Even the Image for the signup form pop up loads slowly, and I optimised that image to make it as small as possible.
My server is in Singapore, do you have any CDNs in the area?
Is it possible to install the javascript and image locally on my server so I don’t have the long load time?
Thanks so much for your patience while I investigated this further! I chatted with @hansen on this and, as I mentioned to @David B. in another post around loading times for .js files, our team is currently investigating ways to improve our JS performance and prioritizing work in this area.
@skabrnes regarding your questions above on Wordpress and hosting your own files…we don’t recommend that you host your own files, because if you self host, we can’t guarantee that Klaviyo features, such as forms, will continue to work properly. You could, however, upload smaller images to the Klaviyo asset library and use that to alleviate some of the loading time issues. Our team is discussing better ways to help our customers with image optimization and reduce JS sizes. We will provide an update when we learn more from the team.
Thanks so much, and we appreciate your patience on our response!
9 seconds is the slowest I’ve ever heard! Would you be able to share details of your PageSpeed results? I ran a test on your site and the results aren’t as bad (Klaviyo took ~220ms) but I’m not sure if it’s location-dependent since I’m in the US.
As far as I can see implementing a CDN for at least a few parts of the world might be the best bet.
It seems Honk Kong and Malaysia have similar timings, so I would imagine South East Asia in general will suffer this issue.
Or better still, if we are using wordpress, would it be possible for us to host our own files? As I also see a really slow clunky load of the popup images as those images also come from Klaviyo, and I’ve optimised them down to a very small size.
Thanks so much for your patience while I investigated this further! I chatted with @hansen on this and, as I mentioned to @David B. in another post around loading times for .js files, our team is currently investigating ways to improve our JS performance and prioritizing work in this area.
@skabrnes regarding your questions above on Wordpress and hosting your own files…we don’t recommend that you host your own files, because if you self host, we can’t guarantee that Klaviyo features, such as forms, will continue to work properly. You could, however, upload smaller images to the Klaviyo asset library and use that to alleviate some of the loading time issues. Our team is discussing better ways to help our customers with image optimization and reduce JS sizes. We will provide an update when we learn more from the team.
Thanks so much, and we appreciate your patience on our response!
@skabrnes I've actually played around with hosting them on my own site running from main domain instead of klaviyo.com domain and it did seem to work but as @cassy.lee mentioned it's not recommended. You'd need to make sure all files are always up to date etc. So wouldn't do this on production.
Also, loading custom fonts and big images in popups can sometimes also create a slowdown. Not sure if the amount of popups you have in Klaviyo (disabled or not) will also create speed issues?
I’m not sure what you’ve done to improve your load time so far, but want to echo @Omar’s awesome suggestion of making sure you have only one signup form live on each page as more signup forms you use per page the slower it gets.
Additionally, as injecting our onsite script through our integration settings is an option for ease of use, you can improve your page load speed by unchecking this option and Manually Install klaviyo.js for Shopify Stores to your theme.liquid file before the closing </body> tag. Here's your script required for manual installation:
@skabrnes one solution would be to only load the Javascript where it is required. Unfortunately, Shopify apps don’t have such a behaviour by default but we created a Shopify app to solve the problem with unused Javascript: https://apps.shopify.com/pagespeed-javascript
It worked well for us, as we only required the Javascript on our homepage and not on product pages etc.
By clicking “Accept All Cookies,” you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.
Privacy Preference Center
Your Privacy
Strictly Necessary Cookies
Performance Cookies
Functional Cookies
Targeting Cookies
Site Analytics
Your Privacy
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
Privacy Notice
Strictly Necessary Cookies
Always Active
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
Performance Cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
Functional Cookies
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
Targeting Cookies
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Site Analytics
These cookies record your visit to our website, and are used to track your visit including information such as: web page interactions (clicks, hovers, focus, mouse movements, browsing, zooms and other interactions), referring web page/source through which you accessed the Sites, heatmaps and scrolls, screen resolution, ISP, and statistics associated with the interaction between device or browser and the Sites. If you are accessing our Services with a European IP address, you have been asked to consent to the use of these cookies (you are free to deny your consent).