Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track success and error compiles #10605

Closed
sethladd opened this issue May 12, 2013 · 2 comments
Closed

Track success and error compiles #10605

sethladd opened this issue May 12, 2013 · 2 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

It would be interesting to know how much people are using the app.

Some ideas:

* Successful compiles

  • Error compiles

You can track arbitrary events using Google Analytics. Here is an example:

<a href="#" onClick="_gaq.push(['_trackEvent', 'Videos', 'Play', 'Baby's First Birthday']);">Play</a>

So, you'll need to execute some JavaScript from your Dart code.

Here are the full docs: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide

_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)

category (required)
The name you supply for the group of objects you want to track.

action (required)
A string that is uniquely paired with each category, and commonly used to define the type of user interaction for the web object.

label (optional)
An optional string to provide additional dimensions to the event data.

value (optional)
An integer that you can use to provide numerical data about the user event.

non-interaction (optional)
A boolean that when set to true, indicates that the event hit will not be used in bounce-rate calculation.

Here's a suggestion:

category: usage
action: compile_yes

category: usage
action: compile_no

Another example would be to track compile times.

category: metrics
action: compile_time
label: <num lines of code, in course-grained increments like 1-20, 21-40, etc>
value: milliseconds

@sethladd
Copy link
Contributor Author

Because you don't want to use 3rd party packages, you can use window.postMessage to send a message to the main page (and thus some JS) for these events. You'll need a snippet of JS running in the main page to listen to events and set the tracking code appropriately.

@peter-ahe-google
Copy link
Contributor

Set owner to @lukechurch.
Added Accepted label.

@sethladd sethladd closed this as completed Jun 4, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants