Closed lastlink closed 5 years ago
Actually, on further consideration this change is unnecessary as the desired functionality is already available via the "custom" attribute. In the event call you can provide the required fields and they will be appended to the options object sent to GA. e.g.,
{
transport: 'beacon',
hitCallback: function () { ... }
}
There is no need to modify the library for this functionality.
Browser cuts out b4 sending track event call if opening a link on another page. ref: https://developers.google.com/analytics/devguides/collection/analyticsjs/events#outbound_link_and_form_tracking
example:https://www.sitepoint.com/track-outbound-links-google-analytics/