Klaviyo.js and Site Speed Reports

read
Last updated at:

Overview

Klaviyo’s onsite JavaScript (“Klaviyo.js”) is the piece of code that enables Active on Site tracking. It is injected automatically through many of our ecommerce integrations, and you can manually install it for other platforms. This feature enables Klaviyo signup forms to appear, and can allow you to track when customers are active on your site. 

Klaviyo’s JavaScript and Site Speed Reports

If you find that Klaviyo’s JavaScript is impacting your website’s performance (i.e., PageSpeed score) and it was automatically installed through an integration, you can try manually installing it instead. 

For Shopify, we do not recommend installing Klaviyo.js manually, but instead recommend you enable Active on Site tracking through Klaviyo’s Shopify app embed. This bypasses the website’s native tag manager and can result in faster loading of Klaviyo’s JavaScript. 

Additionally, if you aren’t using Klaviyo’s signup forms, make sure all the forms in your Signup Forms tab are set to Draft

Regardless of which installation method you use (e.g., through an ecommerce integration, or manually installed), Klaviyo’s JavaScript is loaded asynchronously. This means it will not block other 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. 

Site speed and SEO are important to our customers, and Klaviyo is committed to minimizing the impact from our JavaScript. Learn how our engineers have optimized klaviyo.js recently. You will continue to see improvements as we release new updates. 

Additional Resources

x
Was this article helpful?
12 out of 20 found this helpful