Skip to main content
Solved

Issue with integration with Next.js and BigCommerce Catalyst. No push events processed/recorded.


Forum|alt.badge.img+1

Hello!

 

My name is Dmitry, I am currently working with integration between Klaviyo and BigCommerce/Catalyst.

 

I have some issues with klaviyo integration. I was able to copy all components and code from this old sample repository:

bigcommerce-labs/catalyst-klaviyo but it doesnt work for me.

I was able to load klaviyo.js but when I call for klaviyo.push - nothing happens (no error, no data in klaviyo). I tried to test in several places and several events - active on site, product viewed, product added to cart. But nothing recorded into klaviyo dashboard and I also don't see any fetch calls from website.

 

Also on our test webpage - in theory it must load “active on site” event but it doesnt. If you open any product on website - it must in theory load “product viewed” event - but it doesnt, if you add any product to cart  in theory it must load “added to cart” event but it doesnt.

 

In inspector we can see these scripts loaded.

 

But when we call klaviyo.push we are not getting any errors, or any data stored in our account. Also when we tried to show return value of push - it is “undefined”

 

Do you have any idea what I am doing wrong?

 

Thank you.

Best answer by MANSIR2094

Hello ​@yeskin ,

 

You're welcome! To check if browser tracking is enabled in Klaviyo, follow these steps:

 

1. Log into Klaviyo and go to Account Settings (Click on your profile in the bottom-left corner).

 

2. Navigate to Tracking & Consent under Settings.

 

3. Ensure that "Enable Onsite JavaScript Tracking" is turned ON.

 

4. If you’re tracking signup forms, check Form & SMS Consent Settings to confirm tracking is allowed.

 

Let me know if you need further guidance or if you’re still experiencing issues—I’d be happy to assist!

View original
Did this topic or the replies in the thread help you find an answer to your question?

10 replies

MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • February 9, 2025

Hello ​@yeskin,

 

Thanks for posting in the community, It sounds like Klaviyo isn’t capturing events despite loading the script. Here are key checks:

 

1. Ensure the public API key in klaviyo.js is correct.

 

2. Verify window.klaviyo is defined before calling klaviyo.push.

 

3. Confirm that events use the correct syntax, e.g., klaviyo.push(['track', 'Viewed Product', { ProductID: '123' }])

 

4. Check if browser tracking is enabled in Klaviyo settings.

 

5. Look for CSP restrictions or ad blockers preventing tracking requests.

 

If it's still not working, I can help troubleshoot further—reach out for implementation support.

 


Forum|alt.badge.img+1
  • Author
  • Contributor II
  • 5 replies
  • February 10, 2025

Hello ​@MANSIR2094 !

Thanks for your response. I can confirm all items from your list are done ok, except item 4 - how can I check if browser tracker is enabled? Where is that setting?

Thank you!


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • Answer
  • February 10, 2025

Hello ​@yeskin ,

 

You're welcome! To check if browser tracking is enabled in Klaviyo, follow these steps:

 

1. Log into Klaviyo and go to Account Settings (Click on your profile in the bottom-left corner).

 

2. Navigate to Tracking & Consent under Settings.

 

3. Ensure that "Enable Onsite JavaScript Tracking" is turned ON.

 

4. If you’re tracking signup forms, check Form & SMS Consent Settings to confirm tracking is allowed.

 

Let me know if you need further guidance or if you’re still experiencing issues—I’d be happy to assist!


Forum|alt.badge.img+1
  • Author
  • Contributor II
  • 5 replies
  • February 10, 2025

@MANSIR2094 but I don’t have such section and such setting:

 


Forum|alt.badge.img+1
  • Author
  • Contributor II
  • 5 replies
  • February 10, 2025

Btw I found this setting and testing it now:

 


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • February 10, 2025

@yeskin , 

Thanks for checking! The "Enable Onsite JavaScript Tracking" setting is usually found under Settings > Tracking & Consent, but Klaviyo's UI may vary based on your account type or updates.

Glad to hear you found a setting related to it—let me know if it resolves the issue or if you need further troubleshooting. I'm happy to assist!


Forum|alt.badge.img+1
  • Author
  • Contributor II
  • 5 replies
  • February 10, 2025

Okay! Here is an update.

For some reasons it ONLY work if I add ?utm_email=example@gmail.com to the end of url - whats cool - it pickup my previous actions too. Like if I opened website first, viewed product, added to cart, and only after that called website with utm_email - it started showing my actions.

Why it’s not working without utm_email? Is there any setting for that? I want all anonymous folks to be tracked for every active on site, view product, added to cart (yes we do allow guest checkout).

Is that possible ​@MANSIR2094 ?


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • February 10, 2025

@yeskin ,  Have you been able to solve the issue? kindly check your pm if  you are still not able to get it.

thank you!!


Forum|alt.badge.img+1
  • Author
  • Contributor II
  • 5 replies
  • February 10, 2025

Thank you! Looks like I still need to identify user. And without it doesnt show guests in reports….


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • February 10, 2025

@yeskin 

You're right—Klaviyo doesn’t show guests in reports unless they’re identified.

How to Track Guests Without an Email:

  1. Use an Anonymous ID:

    klaviyo.push(['identify', { $anonymous: true }]);
    

    This tracks actions like Viewed Product and Added to Cart before an email is collected.

  2. Capture Emails When Possible:

    • Ensure email collection via pop-ups, checkout, or forms.
    • Once collected, call:
      klaviyo.push(['identify', { $email: 'user@example.com' }]);
      
  3. Check Tracking Settings:

    • Enable Onsite JavaScript Tracking in Settings > Tracking & Consent.
    • Ensure no ad blockers or cookie restrictions prevent tracking.

Let me know if you need help implementing this!