railslove / rack-tracker

Tracking made easy: Don’t fool around with adding tracking and analytics partials to your app and concentrate on the things that matter.
https://www.railslove.com/open-source
MIT License
647 stars 121 forks source link

Google Analytics using the beacon transport #125

Open chalofa opened 5 years ago

chalofa commented 5 years ago

is there any way to make the Google Analytics tracking code to use the beacon transport?

// Updates the tracker to use `navigator.sendBeacon` if available.
ga('set', 'transport', 'beacon');

https://developers.google.com/analytics/devguides/collection/analyticsjs/sending-hits#specifying_different_transport_mechanisms

DonSchado commented 5 years ago

Sure, would you be able to implement this? Let me know if you need help