added analytics for copied, unsupported, and restarted metrics
This commit is contained in:
parent
48da85b12b
commit
744dbb3a6f
|
@ -7,6 +7,12 @@ const Raven = window.Raven;
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//link back to homepage
|
//link back to homepage
|
||||||
$('.send-new').attr('href', window.location.origin);
|
$('.send-new').attr('href', window.location.origin);
|
||||||
|
$('.send-new').click(function() {
|
||||||
|
window.analytics
|
||||||
|
.sendEvent('recipient', 'restarted', {
|
||||||
|
cd2: 'completed'
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
const filename = $('#dl-filename').html();
|
const filename = $('#dl-filename').html();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
window.Raven = require('raven-js');
|
window.Raven = require('raven-js');
|
||||||
window.Raven.config(window.dsn).install();
|
window.Raven.config(window.dsn).install();
|
||||||
window.dsn = undefined;
|
window.dsn = undefined;
|
||||||
|
|
||||||
|
const testPilotGA = require('testpilot-ga');
|
||||||
|
window.analytics = new testPilotGA({
|
||||||
|
an: 'Firefox Send',
|
||||||
|
ds: 'web',
|
||||||
|
tid: window.trackerId
|
||||||
|
})
|
||||||
|
|
||||||
require('./upload');
|
require('./upload');
|
||||||
require('./download');
|
require('./download');
|
||||||
|
|
|
@ -6,12 +6,32 @@ require('jquery-circle-progress');
|
||||||
const Raven = window.Raven;
|
const Raven = window.Raven;
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
gcmCompliant().catch(err => {
|
gcmCompliant()
|
||||||
|
.catch(err => {
|
||||||
$('#page-one').attr('hidden', true);
|
$('#page-one').attr('hidden', true);
|
||||||
$('#unsupported-browser').removeAttr('hidden');
|
$('#unsupported-browser').removeAttr('hidden');
|
||||||
|
window.analytics
|
||||||
|
.sendEvent('sender', 'unsupported', {
|
||||||
|
cd7: err
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#file-upload').change(onUpload);
|
$('#file-upload').change(onUpload);
|
||||||
|
|
||||||
|
$('#send-new-completed').click(function() {
|
||||||
|
window.analytics
|
||||||
|
.sendEvent('sender', 'restarted', {
|
||||||
|
cd2: 'completed'
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#send-new-error').click(function() {
|
||||||
|
window.analytics
|
||||||
|
.sendEvent('sender', 'restarted', {
|
||||||
|
cd2: 'errored'
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
$('body').on('dragover', allowDrop).on('drop', onUpload);
|
$('body').on('dragover', allowDrop).on('drop', onUpload);
|
||||||
// reset copy button
|
// reset copy button
|
||||||
const $copyBtn = $('#copy-btn');
|
const $copyBtn = $('#copy-btn');
|
||||||
|
@ -32,6 +52,10 @@ $(document).ready(function() {
|
||||||
|
|
||||||
// copy link to clipboard
|
// copy link to clipboard
|
||||||
$copyBtn.click(() => {
|
$copyBtn.click(() => {
|
||||||
|
window.analytics
|
||||||
|
.sendEvent('sender', 'copied', {
|
||||||
|
cd6: 'success-screen'
|
||||||
|
});
|
||||||
const aux = document.createElement('input');
|
const aux = document.createElement('input');
|
||||||
aux.setAttribute('value', $('#link').attr('value'));
|
aux.setAttribute('value', $('#link').attr('value'));
|
||||||
document.body.appendChild(aux);
|
document.body.appendChild(aux);
|
||||||
|
@ -251,6 +275,10 @@ $(document).ready(function() {
|
||||||
|
|
||||||
//copy link to clipboard when icon clicked
|
//copy link to clipboard when icon clicked
|
||||||
$copyIcon.click(function() {
|
$copyIcon.click(function() {
|
||||||
|
window.analytics
|
||||||
|
.sendEvent('sender', 'copied', {
|
||||||
|
cd6: 'upload-list'
|
||||||
|
});
|
||||||
const aux = document.createElement('input');
|
const aux = document.createElement('input');
|
||||||
aux.setAttribute('value', url);
|
aux.setAttribute('value', url);
|
||||||
document.body.appendChild(aux);
|
document.body.appendChild(aux);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -22,6 +22,7 @@
|
||||||
"redis": "^2.7.1",
|
"redis": "^2.7.1",
|
||||||
"selenium-webdriver": "^3.4.0",
|
"selenium-webdriver": "^3.4.0",
|
||||||
"supertest": "^3.0.0",
|
"supertest": "^3.0.0",
|
||||||
|
"testpilot-ga": "^0.2.1",
|
||||||
"uglify-es": "3.0.19"
|
"uglify-es": "3.0.19"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<button id="copy-btn" data-l10n-id="copyUrlFormButton"></button>
|
<button id="copy-btn" data-l10n-id="copyUrlFormButton"></button>
|
||||||
</div>
|
</div>
|
||||||
<button id="delete-file" data-l10n-id="deleteFileButton"></button>
|
<button id="delete-file" data-l10n-id="deleteFileButton"></button>
|
||||||
<a class="send-new" data-l10n-id="sendAnotherFileLink"></a>
|
<a class="send-new" id="send-new-completed" data-l10n-id="sendAnotherFileLink"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<div class="title" data-l10n-id="errorPageHeader"></div>
|
<div class="title" data-l10n-id="errorPageHeader"></div>
|
||||||
<div class="expired-description" data-l10n-id="errorPageMessage"></div>
|
<div class="expired-description" data-l10n-id="errorPageMessage"></div>
|
||||||
<img id="upload-error-img" data-l10n-id="errorAltText" src="/resources/illustration_error.svg"/>
|
<img id="upload-error-img" data-l10n-id="errorAltText" src="/resources/illustration_error.svg"/>
|
||||||
<a class="send-new" data-l10n-id="sendAnotherFileLink"></a>
|
<a class="send-new" id="send-new-error" data-l10n-id="sendAnotherFileLink"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="unsupported-browser" hidden="true">
|
<div id="unsupported-browser" hidden="true">
|
||||||
|
|
Loading…
Reference in New Issue