I have an e-commerce (Magento) website. On the cart page, at the proceed to Checkout button, I have the following event:
When the users clicks, the following tag should by fired:
<script type="text/javascript">
ga('send', 'event', {
eventCategory: {{pageType}},
eventAction: {{event}},
eventLabel: {{basketQuantity}},
eventValue: {{basketTotal}},
hitCallback: function() {
window.location={{checkoutURL}};
}
});
</script>
Now... when the user clicks it's redirected to the checkoutURL.
If I remove the hitCallback function, nothing happens, so I understand that the event is stored at Analytics and then the user is redirected.
The problem is that I have mucho more visits to the checkoutURL (coming from the cart -navigation summary-) than events for it.
Can you help me?
Similar happens on the add to cart button :s