chore: Track collaboration (#3211)

This commit is contained in:
Lipis
2021-03-10 17:45:37 +02:00
committed by GitHub
parent 1bb3d71d22
commit bb612fd768
2 changed files with 5 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import { getSyncableElements } from "../../packages/excalidraw/index";
import { ExcalidrawElement } from "../../element/types";
import { BROADCAST, SCENE } from "../app_constants";
import { UserIdleState } from "./types";
import { trackEvent } from "../../analytics";
class Portal {
collab: CollabWrapper;
@@ -32,6 +33,7 @@ class Portal {
this.socket.on("init-room", () => {
if (this.socket) {
this.socket.emit("join-room", this.roomId);
trackEvent("share", "room joined");
}
});
this.socket.on("new-user", async (_socketId: string) => {