docs/integrations/marketing/klaviyo.mdx
Klaviyo is a powerful marketing automation platform used for email and SMS campaigns. By connecting your store to Klaviyo, you can automatically track user interactions, build audience profiles, and grow your newsletter subscriber base - all without manual setup.
With Spree’s native integration, you can start collecting meaningful data for segmentation and automation with just a few clicks.
<Info> You must have an existing Klaviyo account to connect this integration. </Info>To install the Klaviyo integration, you need to run the following command:
bundle add spree_klaviyo && bundle exec rails g spree_klaviyo:install
After that, you need to make sure to restart the server.
Sign in to your Spree admin dashboard and navigate to the Integrations tab.
To connect Klaviyo, locate the Klaviyo tile under the Marketing section and click Connect Klaviyo to open the setup form.
You’ll need to enter the following:
Click Create to finalize the integration.
<Info> You must configure your Private API Key in Klaviyo before you can finalize the integration (see below). </Info>Before you can finalize the creation of your Klaviyo integration, you’ll need to create a Private API Key. To do so navigate to Settings → Account → API Keys in Klaviyo.
Click Create Private API Key to open the key creation form.
When generating your Private API Key in Klaviyo, you must enable specific access scopes for the integration to function properly:
You can configure this by selecting Custom Key during key configuration, then selecting the required scopes as mentioned above.
<Warning> Without the appropriate access levels, some tracked events or newsletter subscriptions may fail to reach Klaviyo. </Warning>Once the integration is connected, Spree automatically tracks the following customer events and sends them to Klaviyo:
These events populate the Audience → Profiles section in Klaviyo, where you can view each user's tracked activity and properties. Lists used for newsletter subscriptions can be found in Audience → Lists & Segments.
After setup, you can revisit the integration form at any time to: