1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 06:43:35 +00:00

analytics event tracking

This commit is contained in:
Kyle Spearrin
2016-09-27 23:19:33 -04:00
parent a727e107fe
commit 96c8a99173
17 changed files with 86 additions and 23 deletions

View File

@@ -138,12 +138,24 @@ chrome.contextMenus.onClicked.addListener(function (info, tab) {
for (var i = 0; i < sites.length; i++) {
if (sites[i].id === id) {
if (info.parentMenuItemId === 'autofill') {
ga('send', {
hitType: 'event',
eventAction: 'Autofilled From Context Menu'
});
autofillPage(sites[i]);
}
else if (info.parentMenuItemId === 'copy-username') {
ga('send', {
hitType: 'event',
eventAction: 'Copied Username From Context Menu'
});
copyToClipboard(sites[i].username);
}
else if (info.parentMenuItemId === 'copy-password') {
ga('send', {
hitType: 'event',
eventAction: 'Copied Password From Context Menu'
});
copyToClipboard(sites[i].password);
}
return;