feat: count analytics
This commit is contained in:
@@ -325,6 +325,12 @@ async function executeRun(id: string) {
|
||||
binaryOutput: uploadedBinaryOutput,
|
||||
});
|
||||
|
||||
let totalRowsExtracted = 0;
|
||||
updatedRun.serializableOutput['item-0'].forEach((item: any) => {
|
||||
totalRowsExtracted += Object.keys(item).length;
|
||||
}
|
||||
);
|
||||
|
||||
captureServerAnalytics.capture({
|
||||
distinctId: id,
|
||||
event: 'maxun-oss-run-created-api',
|
||||
@@ -332,6 +338,9 @@ async function executeRun(id: string) {
|
||||
runId: id,
|
||||
created_at: new Date().toISOString(),
|
||||
status: 'success',
|
||||
extractedItemsCount: updatedRun.serializableOutput['item-0'].length,
|
||||
extractedRowsCount: totalRowsExtracted,
|
||||
extractedScreenshotsCount: updatedRun.binaryOutput['item-0'].length,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user