Anyone any ideas on this?
Hey Derek,
Thank you for using Enfold.
You can create a custom script to trigger the tracking code when you clicked on a menu item. Example.
function ava_custom_menu_tracking_code() {
?>
<script>
(function($) {
$('.menu-item').on('click', function() {
// ga code here
});
})(jQuery);
</script>
<?php
}
add_action( 'wp_footer', 'ava_custom_menu_tracking_code', 9999 );
Best regards,
Ismael
Thanks Ismael – can I tie this to trigger on a particular menu item only?