$(function () {
 
        // Track all telephone link clicks
        $('a[href^="tel:"]').click(function (e) {
            var link = $(this).attr('href').replace(/tel:\+?/, '');
 
            // If not already tracked in ga-on events
            if (!$(this).is('[ga-on]') && ga) {
                ga('send', 'event', {
                    eventCategory: 'Phone',
                    eventAction: 'Click',
                    eventLabel: link,
                    transport: 'beacon'
                });
            }
            // Send Facebook Pixel 'lead' action
            if (typeof (fbq) !== 'undefined') {
                fbq('track', 'Lead', {
                    content_name: link
                });
            }
        });
 
        // Track all clicks on data-event-click items
        $('*[data-event-click]').click(function (e) {
            var action = $(this).data('event-click');
            var link = $(this).attr('href');
 
            // If not already tracked in ga-on events
            ga('send', 'event', {
                eventCategory: 'EventClick',
                eventAction: action,
                eventLabel: link,
                transport: 'beacon'
            });
            // Send Facebook Pixel 'lead' action
            if (typeof (fbq) !== 'undefined') {
                fbq('track', 'Lead', {
                    content_name: action
                });
            }
        });
});
