Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
registerUser(currentEducator) {
try {
if (!isEnabled()) return;
mixpanel.init(readEnv().mixpanelToken);
mixpanel.set_config({
track_pageview: true,
secure_cookie: true,
cross_subdomain_cookie: false // https://help.mixpanel.com/hc/en-us/articles/115004507486-Track-Across-Hosted-Subdomains
});
mixpanel.identify(currentEducator.id);
mixpanel.register({
'deployment_key': readEnv().deploymentKey,
'district_key': readEnv().districtKey,
'educator_id': currentEducator.id,
'educator_is_admin': currentEducator.admin,
'educator_school_id': currentEducator.school_id
});
}
catch (err) {
console.error(err); // eslint-disable-line no-console
}