feat: Track current version (#2731)
This commit is contained in:
@ -6,6 +6,7 @@ import React, {
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { trackEvent } from "../analytics";
|
||||
import { getDefaultAppState } from "../appState";
|
||||
import { ExcalidrawImperativeAPI } from "../components/App";
|
||||
import { ErrorDialog } from "../components/ErrorDialog";
|
||||
@ -22,7 +23,12 @@ import Excalidraw, {
|
||||
languages,
|
||||
} from "../packages/excalidraw/index";
|
||||
import { AppState, ExcalidrawAPIRefValue } from "../types";
|
||||
import { debounce, ResolvablePromise, resolvablePromise } from "../utils";
|
||||
import {
|
||||
debounce,
|
||||
getVersion,
|
||||
ResolvablePromise,
|
||||
resolvablePromise,
|
||||
} from "../utils";
|
||||
import { SAVE_TO_LOCAL_STORAGE_TIMEOUT } from "./app_constants";
|
||||
import CollabWrapper, { CollabAPI } from "./collab/CollabWrapper";
|
||||
import { LanguageList } from "./components/LanguageList";
|
||||
@ -223,6 +229,7 @@ function ExcalidrawWrapper(props: { collab: CollabAPI }) {
|
||||
const { collab } = props;
|
||||
|
||||
useEffect(() => {
|
||||
trackEvent("load", "version", getVersion());
|
||||
excalidrawRef.current!.readyPromise.then((excalidrawApi) => {
|
||||
initializeScene({
|
||||
resetScene: excalidrawApi.resetScene,
|
||||
|
Reference in New Issue
Block a user