golang / gddo

Go Doc Dot Org
https://godoc.org
BSD 3-Clause "New" or "Revised" License
1.1k stars 267 forks source link

analytics: measure usage of keyboard shortcuts and other features #649

Open broady opened 4 years ago

broady commented 4 years ago

Trigger an event when keyboard shortcuts are used:

https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEventTracking

Probably here:

https://github.com/golang/gddo/blob/72a348e765d293ed6d1ded7b699591f14d6cd921/gddo-server/assets/site.js#L174-L207

broady commented 4 years ago

To collect stats via GA on clicking through to source, it looks like upgrading to analytics.js might be required. I don't think the legacy ga.js gives you a callback after the event was tracked.