MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / createUserEvent

Function createUserEvent

apps/web/services/customerIo/trackEvents.ts:20–36  ·  view source on GitHub ↗
(
  id: string,
  email: string,
  createdAt: Date
)

Source from the content-addressed store, hash-verified

18const client: customerIoClient | null = customerIoClient();
19
20export const createUserEvent = async (
21 id: string,
22 email: string,
23 createdAt: Date
24) => {
25 if (process.env.NODE_ENV === 'test') {
26 return;
27 }
28 try {
29 client?.identify(email, {
30 id,
31 created_at: createdAt.getTime() / 1000,
32 });
33 } catch (e) {
34 console.error('failed to track event');
35 }
36};
37
38export const createAccountEvent = async (email: string, accountId: string) => {
39 if (process.env.NODE_ENV === 'test') {

Callers 1

eventSignUpFunction · 0.90

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected