Hi,
Does anyone have the snippet of code that is need for the added to cart & viewed product event for Magneto. I can find shopify and Bigcommerce.
Many thanks
Dave
Hi,
Does anyone have the snippet of code that is need for the added to cart & viewed product event for Magneto. I can find shopify and Bigcommerce.
Many thanks
Dave
Hi
So the reason you’re able to find documentation for Shopify and BigCommerce Added to Cart and Viewed Product but not Magento is that we do not have a built-in or copy-paste Added to Cart snippet for Magento.
Even though we don’t have something that can be copied and pasted like for Shopify or BigCommerce, you can still get this set up but this is something that the business will need to set up using our Javascript Track API.
The process (and most likely the snippet you’re looking for) is similar to the process for Shopify and BigCommerce meaning listening for a person clicking on the “add to cart” button and then sending the Viewed Product payload as an Added to Cart event.
I would definitely recommend passing this information along to whatever developer resources you have available so that they can take a look and get this set up.
Brilliant thank you
If not it's basically triggering a script when someones clicks on the add to cart button that sends related information (product info) to Klaviyo using what
Brilliant thank you
How did you achieved that? i also want to do something similar like that.
Yes, this is a known behavior in Magento where system URLs get passed to Klaviyo instead of the proper SEO-friendly URLs.
Magento by default generates both system paths and rewritten SEO URLs, but sometimes integrations only pull the system path.
The support is partly correct—many Magento users do face this, especially when using email marketing tools like Klaviyo.
The SEO issue here is that system URLs (e.g., /catalog/category/id/6
) are not optimized for search engines or user experience.
Manually editing the URL in the Klaviyo email template is one workaround, but it’s not scalable for large catalogs.
A common solution is customizing the integration so Klaviyo pulls the URL rewrite table (which stores Seo car park site URLs).
You can check Magento’s URL Rewrite Management in admin to confirm the correct SEO-optimized links exist.
Developers often use Magento’s getProductUrl() function instead of system paths to ensure SEO links are retrieved.
This matters because emails with poor URLs can reduce click-through rates and negatively impact SEO performance when shared.
If you’re serious about SEO optimization, ensuring that all marketing channels use clean, human-readable URLs is essential.
Some Magento-Klaviyo users add middleware or extensions to automatically replace system URLs with SEO-friendly product links.
In short: yes, others have encountered this, but with the right SEO customization, you can make Klaviyo pull the proper rewritten URLs instead of editing them manually.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.