SFRA Commerce Cloud Cartridge events not showing

Badge +2

I have installed the integration Cartridge for SFRA Commerce Cloud.
I can only see the OCAPI “Placed Order" and “Ordered Product”.

I have installed this in Project > Client > Cartridges so I can use for multiple sites, but when I try and add

this below the path cannot be found so my events are not firing from the Cartridge. 

I placed the pageFooter.isml 


<isinclude template="klaviyo/klaviyoFooter"/>

Best answer by Taylor Tarpley 19 May 2022, 16:30

View original

6 replies

Userlevel 1
Badge +1

Hi there,

Thank you for posting!
Could you please confirm that you’ve also completed step 2 for the SFRA section for adding the snippets?  In addition, could you please confirm that the Klaviyo Cartridge is active and contains the necessary API keys?
The Cartridge will only send the metrics if it’s active and the API keys have been added to the settings appropriately.
If all of these requirements are met, then could you please confirm if you’re seeing any error messages on the Salesforce side?  If so, would you please share them here?  Thank you!

Badge +2

Thanks Chuck.

Yes, I have set up Step 2.

And the Klaviyo Cartridge is Active with correct API keys.

However, how would I use this function in Cart.js if I wanted to prepend this to AddProduct?


server.prepend('AddProduct', function (req, res, next) {

if (dw.system.Site.getCurrent().getCustomPreferenceValue('klaviyo_enabled')) {

var KlaviyoUtils = require('*/cartridge/scripts/utils/klaviyo/klaviyoUtils');



return next();



The error I currently get is:

 trackEvent() failed for email: undefined. Service Connection for send email via Klaviyo returned null.

I currently have 3 different Salesforce CC websites where I would need these base Cartridges added to. So I was not sure if some of these need to be defined within the app_site_skin itself.

Do you have an example site structure for SFRA + Klaviyo integration?


Badge +2

Hi. Can anyone help with the above?

Badge +2

Any Klaviyo team SFRA developers have any advice?

Userlevel 7
Badge +60

Hi @scullchr


We’ve looped in a Success Engineer to further troubleshoot this with you so we can get to the bottom of this issue together! 


Thanks for sharing your question with the Community!



Later Edit: The issue this user experienced was related to the fact the customer email address was not being added to the Added to Cart events, and so when the API request to Klaviyo is made, the API is rejecting the request. Once the added to cart snippets was correctly placed in the app_storefront_base code the AddProduct function referred to in the documentation fired successfully. 

Badge +2

Hi Chuck. Please check my ticket support number 905407