Skip to content

Commit

Permalink
Merge pull request #104 from glogiotatidis/1151563
Browse files Browse the repository at this point in the history
 [fix bug 1151563] Send metric on about:accounts click.
  • Loading branch information
glogiotatidis committed Apr 15, 2015
2 parents 4133b39 + 10c3d9b commit eff2999
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions snippets/base/templates/base/includes/snippet_js.html
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,16 @@
target = target.parentNode;
}
if (target && target.href && target.href.indexOf('about:accounts') === 0) {
var event = new CustomEvent(
'mozUITour',
{ bubbles: true, detail: { action:'showFirefoxAccounts', data: {}}}
);
document.dispatchEvent(event);
var snippet_id = document.getElementById('snippet_set').getAttribute('data-snippet-id');
var metric = snippet_id + '-about-accounts-click';
var fire_event = function() {
var event = new CustomEvent(
'mozUITour',
{ bubbles: true, detail: { action:'showFirefoxAccounts', data: {}}}
);
document.dispatchEvent(event);
};
sendMetric(metric, fire_event);
}
}, false);

Expand Down

0 comments on commit eff2999

Please sign in to comment.