Skip to main content
Glama
thoughtspot
by thoughtspot
mixpanel.ts1.18 kB
import { MixpanelClient } from "./mixpanel-client"; import type { SessionInfo } from "../../thoughtspot/types"; import type { Tracker } from "../index"; export class MixpanelTracker implements Tracker { private mixpanel: MixpanelClient; constructor(sessionInfo: SessionInfo, client: any = {}) { client = client || {}; this.mixpanel = new MixpanelClient(sessionInfo.mixpanelToken); this.mixpanel.identify(sessionInfo.userGUID); this.mixpanel.register({ clusterId: sessionInfo.clusterId, clusterName: sessionInfo.clusterName, releaseVersion: sessionInfo.releaseVersion, clientName: client.clientName, clientId: client.clientId, registrationDate: client.registrationDate, }); } async track(eventName: string, props: { [key: string]: any }) { try { await this.mixpanel.track(eventName, props); } catch (error) { console.error("Error tracking event: ", error, " for eventName: ", eventName, " and props: ", props); } console.debug("Tracked event: ", eventName, " with props: ", props); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thoughtspot/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server