Skip to main content

Hello,

we run a Shopify shop with native integration with Google Analytics. 

I added the script for tracking Klaviyo events in theme.liquid as follows:

<script>
window.addEventListener("klaviyoForms", function(e) {
if (e.detail.type == 'open' || e.detail.type == 'embedOpen') {
ga('send', 'event', 'Klaviyo form', 'form_open', e.detail.formId, {nonInteraction: true});
}
if (e.detail.type == 'submit') {
ga('send', 'event', 'Klaviyo form', 'form_submit', e.detail.formId);
}
if (e.detail.type == 'close') {
ga('send', 'event', 'Klaviyo form', 'form_close', e.detail.formId, , {nonInteraction: true});
}
});
</script>

When I try to test whether the events are coming through via Google Analytics Real time Events, I see nothing coming from Klaviyo.

I can’t figure out whether something is blocking the event send. 

Context: 

  • Shopify (non plus) 
  • in theme.liquid:
    • Segment script
    • GTM script 
    • Clarity script

Anyone could possibly point out a direction to solve the issue? 

Thanks

Hi @VincenzoGTJ,

Without knowing your site or setup you might want to check if you're using gtag version of the tracking. Check this page for the 2 versions: https://help.klaviyo.com/hc/en-us/articles/115005077027-How-to-Configure-Google-Analytics-Goal-Tracking-for-a-Signup-Form#:~:text=You%20can%20track%20Klaviyo%20forms,the%20snippet%20into%20your%20theme

 

Also when testing this make sure you're using a Google Analytics views without any ip filters. If you're filtering yourself out you won't see your events.

 

Hope it helps

Omar Lovert // Polaris Growth // Klaviyo Master Gold Partner


I found myself here with a similar problem but with G4 and not universal analytics.

Events are being tracked in UA at the cost of the bounce not tracking correctly.

The problem is I have the event tags installed but they aren’t being tracked in the new G4 Google analytics.

 

 

 


I found myself here with a similar problem but with G4 and not universal analytics.

Events are being tracked in UA at the cost of the bounce not tracking correctly.

The problem is I have the event tags installed but they aren’t being tracked in the new G4 Google analytics.

 

 

 

I’m having the same problem myself.


Reply