Skip to main content
All CollectionsGetting started
How to send add to carts to Klaviyo
How to send add to carts to Klaviyo

To automatically track add-to-cart events, product views, and other site activity in Klaviyo using Selo AI

E
Written by Emma R
Updated over a month ago

To automatically track add-to-cart events, product views, and other site activity in Klaviyo using Selo AI, follow these instructions to integrate the feature seamlessly. This integration works out of the box with Klaviyo's Shopify integration.

Step-by-Step Instructions

1. Copy the Code Below

Copy the code snippet below and paste it right after your Selo AI tag in your site's code.

<!-- Selo AI Klaviyo script -->
(function() {
var script = document.createElement('script');
script.src = 'https://www.nivaai.com/lookup.js';
script.onload = function() {
window.addEventListener('completeSeloLookup', function() {
window._learnq = window._learnq || [];
var email = ntag.user().traits().email;
if (email) {
window._learnq.push(['identify', { 'email': email }]);
}
});
};
document.head.appendChild(script);
})();
</script>

2. Enable New "Added to Cart" Tracking in Klaviyo

Make sure to enable the new "Added to Cart" tracking feature in Klaviyo for this to work. This will ensure that Klaviyo can recognize and associate your visitors' email addresses with their activity on your site, including added-to-cart actions and product views.

How This Script Works

This script automatically identifies anonymous visitors’ email addresses to Klaviyo and associates any site activity like add-to-carts, products viewed, and more. It also works seamlessly with Klaviyo's Shopify integration, giving you a complete view of your customers' behavior.

Important: Ensure that your Klaviyo tracking script is included on your page, and that you've followed the steps above for the integration to work correctly.

Did this answer your question?