main.js
/**
	* Function that tracks a click on an outbound link in Google Analytics.
	* This function takes a valid URL string as an argument, and uses that URL string
	* as the event label. Setting the transport method to 'beacon' lets the hit be sent
	* using 'navigator.sendBeacon' in browser that support it.
	*/
Function that tracks a click on an outbound link in Google Analytics.
This function takes a valid URL string as an argument, and uses that URL string
as the event label. Setting the transport method to 'beacon' lets the hit be sent
using 'navigator.sendBeacon' in browser that support it.
Function that tracks a click on an outbound link in Google Analytics . This function takes a valid URL string as an argument and uses that URL string as the event label . Setting the transport method to ' beacon ' lets the hit be sent using ' navigator . sendBeacon ' in browser that support it .
function trackOutboundLink (url, post_name, editor) {
	   ga('send', 'event', 'outbound', post_name, url, {
		 'transport': 'beacon',
	   });
	}
function trackOutboundLink ( url , post_name , editor ) { ga ( 'send' , 'event' , 'outbound' , post_name , url , { 'transport' : 'beacon' , } ) ; }
Function that tracks a click on an outbound link in Google Analytics.
Function that tracks a click on an outbound link in Google Analytics .
// ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]); // If opening a link in the current window, this opens the url AFTER // registering the hit with Analytics. Disabled because here want the // link to open in a new window, so this hit can occur in the current tab. //'hitCallback': function(){document.location = url;}