refactor: use capture

This commit is contained in:
karishmas6
2024-10-29 03:46:13 +05:30
parent 9a851a8650
commit 12eee989a1
3 changed files with 27 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ import fs from "fs";
import { getBestSelectorForAction } from "../utils";
import { browserPool } from "../../server";
import { uuid } from "uuidv4";
import captureServerAnalytics from "../../utils/analytics"
import { capture } from "../../utils/analytics"
interface PersistedGeneratedData {
lastUsedSelector: string;
@@ -496,14 +496,13 @@ export class WorkflowGenerator {
recording_meta: this.recordingMeta,
recording: recording,
});
captureServerAnalytics.capture({
distinctId: userId.toString(),
event: 'maxun-oss-robot-created',
properties: {
capture(
'maxun-oss-robot-created',
{
robot_meta: robot.recording_meta,
recording: robot.recording,
}
})
)
logger.log('info', `Robot saved with id: ${robot.id}`);
}