Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Track events and list event names with the MailGlyph Node.js SDK.
events.track
import MailGlyph from 'mailglyph'; const tracker = new MailGlyph(process.env.MAILGLYPH_PUBLIC_KEY as string); const result = await tracker.events.track({ email: '[email protected]', event: 'purchase', subscribed: true, data: { product: 'premium', amount: 99 } }); console.log(result.success, result.data.timestamp);
events.listNames
import MailGlyph from 'mailglyph'; const client = new MailGlyph(process.env.MAILGLYPH_SECRET_KEY as string); const { eventNames } = await client.events.listNames(); console.log(eventNames);
events.getNames
getNames()
listNames()
const { eventNames } = await client.events.getNames(); console.log(eventNames);