Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(props: {}) {
super(props);
Amplitude.initialize("31ef1b42450bb6c4372b30524c69b9a9");
Amplitude.setUserId("1");
Amplitude.setUserProperties({
age: 42
});
}
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();
}
}