# assets/components/klaviyo/identify.tsx

This file is part of the skill, at `assets/components/klaviyo/identify.tsx` relative to the skill's directory. Write the code below to that path in the user's project before running or copying it.

```
"use client";

import { useEffect } from "react";

import { identifyKlaviyoProfile } from "@/lib/klaviyo/client";

export function KlaviyoIdentify({
  email,
  firstName,
  lastName,
}: {
  email: string;
  firstName?: string | null;
  lastName?: string | null;
}) {
  useEffect(() => {
    identifyKlaviyoProfile({
      email,
      first_name: firstName ?? undefined,
      last_name: lastName ?? undefined,
    });
  }, [email, firstName, lastName]);
  return null;
}
```
