revolunet / angular-google-analytics

Google Analytics tracking for your AngularJS apps
MIT License
652 stars 179 forks source link

provide support for outbound link calls #209

Closed lastlink closed 5 years ago

lastlink commented 6 years ago

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/

justinsa commented 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.