feat: robot run analytics
This commit is contained in:
@@ -21,6 +21,7 @@ import fs from "fs";
|
||||
import { getBestSelectorForAction } from "../utils";
|
||||
import { browserPool } from "../../server";
|
||||
import { uuid } from "uuidv4";
|
||||
import captureServerAnalytics from "../../utils/analytics"
|
||||
|
||||
interface PersistedGeneratedData {
|
||||
lastUsedSelector: string;
|
||||
@@ -495,6 +496,14 @@ export class WorkflowGenerator {
|
||||
recording_meta: this.recordingMeta,
|
||||
recording: recording,
|
||||
});
|
||||
captureServerAnalytics.capture({
|
||||
distinctId: userId.toString(),
|
||||
event: 'maxun-oss-robot-created',
|
||||
properties: {
|
||||
robot_meta: robot.recording_meta,
|
||||
recording: robot.recording,
|
||||
}
|
||||
})
|
||||
|
||||
logger.log('info', `Robot saved with id: ${robot.id}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user