1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

[Editor] Add some telemetry to know how often the editing features are used (bug 1782254)

This commit is contained in:
Calixte Denizet 2022-08-02 18:29:01 +02:00
parent 803e7af595
commit 94f57e5dd7
4 changed files with 45 additions and 0 deletions

View file

@ -1044,6 +1044,15 @@ const PDFViewerApplication = {
await this.pdfScriptingManager.dispatchDidSave();
this._saveInProgress = false;
}
if (this.pdfDocument?.annotationStorage.hasAnnotationEditors) {
this.externalServices.reportTelemetry({
type: "editing",
data: {
type: "save",
},
});
}
},
downloadOrSave() {
@ -1734,6 +1743,12 @@ const PDFViewerApplication = {
delete this._annotationStorageModified;
}
};
annotationStorage.onAnnotationEditor = typeStr => {
this.externalServices.reportTelemetry({
type: "editing",
data: { type: typeStr },
});
};
},
setInitialView(
@ -1872,6 +1887,15 @@ const PDFViewerApplication = {
this.externalServices.reportTelemetry({
type: "print",
});
if (this.pdfDocument?.annotationStorage.hasAnnotationEditors) {
this.externalServices.reportTelemetry({
type: "editing",
data: {
type: "print",
},
});
}
},
afterPrint() {