Tagged: comments, google analytics, Tracking
Hey Robin,
Might I suggest another approach, try using a function to track your comment clicks.
Try adding this to your function.php:
function track_comment(){
?>
<script>
$('.form-submit .submit[type="submit"]').on('click', function() {
ga('send', 'event', 'button', 'click', 'comment');
});
</script>
<?php
}
add_action('wp_footer', 'track_comment');
Please note that tracking can sometimes take a little while to show up at Google Analytics.
Best regards,
Mike
Thanks a lot for your input Mike!
I just set it up, will wait a few days and get back to you in case the tracking doesn’t work.
Cheers
Robin.