You will learn
Learn about Klaviyo's onsite JavaScript (Klaviyo.js) which is the JavaScript snippet that enables Active on Site tracking), its impact on site speed.
Troubleshoot site speed performanceTroubleshoot site speed performance
Klaviyo.js is injected automatically through many of our ecommerce integrations, and you can manually install it for other platforms. It enables Klaviyo sign-up forms to appear, and can allow you to track when customers are active on your site.
- 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.
- If you don't use Klaviyo sign-up forms (meaning you use another tool for creating and publishing sign-up forms on your website), make sure that all forms in your Sign-up forms tab are set to Draft.
Navigate to the Sign-up forms tab to see the Status of each of your sign-up forms. Live indicates a published form on your site, Editing indicates a live form that has unpublished changes, and Draft indicates a form that has not been published on your site.
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 to make Klaviyo.js more performant and improve load times.
Additional resources