Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function identify(id: string | null, options?: TrackingOptions) {
initialize();
const properties = normalizeTrackingOptions(options);
if (id) {
Amplitude.setUserId(id);
if (properties) {
Amplitude.setUserProperties(properties);
}
} else {
Amplitude.clearUserProperties();
}
}