Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #984234

    Anyone any ideas on this?

    #984508

    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

    #984606

    Thanks Ismael – can I tie this to trigger on a particular menu item only?

    #984763

    Hi dereknicholson,

    Yes, menu items have ids which you can use for the code.
    Image 2018-07-12 at 15.07.55.png

    Best regards,
    Victoria

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.