Skip to main content
Glama
tracker.ts783 B
/** * small wrapper for tracking so we can pass in our domain objects * and get consistently formatted data */ import _ from 'lodash'; import { User } from '@prisma/client'; import { posthog } from './posthog'; function identifyUser(user: User) { posthog.identify({ distinctId: user.id, properties: { // TODO: convert to snake_case?? ..._.pick(user, [ 'auth0Id', 'email', 'firstName', 'lastName', 'nickname', 'githubUsername', 'discordUsername', ]), }, }); } function trackEvent(user: User, eventName: string, properties?: any) { posthog.capture({ distinctId: user.id, event: `aa-${eventName}`, properties, }); } export const tracker = { identifyUser, trackEvent, };

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/systeminit/si'

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