Troubleshooting Klaviyo.js and site speed reports

Estimated 2 minute read
|
Updated Aug 29, 2024, 4:51 PM EST
You will learn

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 performance

Troubleshoot 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. 

    The sign-up forms tab showing the Status column for three example live, editing, and draft forms.

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

Additional resources

Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Live training
Join a live session with Klaviyo experts to learn about best practices, how to set up key features, and more.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type