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