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:
parent
803e7af595
commit
94f57e5dd7
4 changed files with 45 additions and 0 deletions
24
web/app.js
24
web/app.js
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue