insight icon indicating copy to clipboard operation
insight copied to clipboard

Refactor - use GA app tracking, allows tracking exceptions, timings, etc.

Open joefiorini opened this issue 11 years ago • 3 comments

It would be good to provide an API for tracking additional types. Specifically, GA supports timings & exceptions. It would be great if we could just call insight.trackError(error) or insight.startTimer("build");/insight.stopTimer("build");. To implement this, we would need to allow passing different sets of parameters to the providers.google method. Per #19 I'm also using t: "appview" to track commands rather than the default "pageview". This could help make that more configurable as well so that we can continue using insight without anyone else having to change their setup.

Thoughts on this?

joefiorini avatar Mar 29 '14 18:03 joefiorini

Yes, that would be useful :)

sindresorhus avatar Mar 29 '14 18:03 sindresorhus

Hi @joefiorini, I believe you're looking for screenview, not appview, per docs.

~~The weird thing is that GA web tracking dashboards has a timing dashboard but not an exception dashboard. GA app tracking dashboards has exception but not timing. The only way to tell for sure is to send the raw data to GA anyways, then use Reporting API to pull the raw data, see if it's recorded. I plan to try this out at some point.~~

Scratch that, it's called "App Speed".

screen shot 2014-08-08 at 11 01 38 pm

So appview is what we want to refactor to, which allows these 2 features plus it makes more sense semantically. I'm borrowing this issue to track it.

rayshan avatar Aug 09 '14 06:08 rayshan

For anyone looking; PR welcome :)

sindresorhus avatar Oct 22 '14 23:10 sindresorhus