mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-05-05 01:17:01 +02:00
Update downloader.js
This commit is contained in:
parent
0f6d5e5a41
commit
68349c4426
@ -156,15 +156,16 @@
|
|||||||
|
|
||||||
// Capture analytics
|
// Capture analytics
|
||||||
const pageCount = file && file.type === 'application/pdf' ? await getPDFPageCount(file) : null;
|
const pageCount = file && file.type === 'application/pdf' ? await getPDFPageCount(file) : null;
|
||||||
|
if(analyticsEnabled) {
|
||||||
posthog.capture('file_processing', {
|
posthog.capture('file_processing', {
|
||||||
success: success,
|
success: success,
|
||||||
file_type: file ? file.type || 'unknown' : 'unknown',
|
file_type: file ? file.type || 'unknown' : 'unknown',
|
||||||
file_size: file ? file.size : 0,
|
file_size: file ? file.size : 0,
|
||||||
processing_time: processingTime,
|
processing_time: processingTime,
|
||||||
error_message: errorMessage,
|
error_message: errorMessage,
|
||||||
pdf_pages: pageCount
|
pdf_pages: pageCount
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user