adding url metrics

This commit is contained in:
Jeffrey Morgan
2015-04-27 21:53:44 -04:00
parent 5736c9c859
commit df58da92ea
2 changed files with 8 additions and 1 deletions

View File

@@ -23,7 +23,9 @@ var ImageCard = React.createClass({
metrics.track('Selected Image Tag');
},
handleClick: function (name) {
metrics.track('Created Container');
metrics.track('Created Container', {
from: 'search'
});
ContainerStore.create(name, this.state.chosenTag, function () {
$(document.body).find('.new-container-item').parent().fadeOut();
}.bind(this));

View File

@@ -2,6 +2,7 @@ var React = require('react/addons');
var Router = require('react-router');
var shell = require('shell');
var ContainerStore = require('../stores/ContainerStore');
var metrics = require('../utils/MetricsUtil');
module.exports = React.createClass({
mixins: [Router.Navigation],
@@ -14,10 +15,14 @@ module.exports = React.createClass({
}
},
handleCancelClick: function () {
metrics.track('Canceled Click-To-Pull');
ContainerStore.clearPending();
this.context.router.transitionTo('new');
},
handleConfirmClick: function () {
metrics.track('Created Container', {
from: 'click-to-pull'
});
ContainerStore.clearPending();
ContainerStore.create(this.props.pending.repository, this.props.pending.tag, function () {});
},