Global Click Handler Not Working

Hey guys,

I am having trouble getting event tracking to actually work on a recent site. I implemented the code given in the instructions for GA & Mixpanel and I am receiving data in my GA account (also checked in Tag Assistant and that is working) but I am not receiving any event data whatsoever. Any ideas?

The site is http://www.cafenataliecatering.com

Where did you get the code from? The instructions are unclear and the code is horrible. Look, I even fixed it before and you could have just used the forum search function first: Google Analytics event tracking (Click Tracking)

Try changing it to this

<script>
Webflow.push(function() {
  $(document).on('click', '[data-gatrack]', function() {
    var trackData = $(this).attr('data-gatrack');
    if (!trackData) { return; }
    var trackParams = ['_trackEvent'].concat(trackData.split(','));
    _gaq.push(trackParams);
    console.log(trackData, trackParams); // You can remove this line when your issue is resolved.
  });
});
</script>

No need to be so condescending with your reply. Your solution was actually the first one that I tried before trying the code from Webflow’s official post, I tried yours again to no avail.

It is now working to the point that I see the event tags firing in Google Tag Assistant and there are events showing in real time but nothing historically. Any suggestions?

Wait a week and check the history again to see if the previous week’s data is captured.

Yeah I saw that it can take a bit so i’ve given it 10 days and still nothing. Maybe it’s an issue on the GA side?