Commit f8eeafb7 authored by Igor Stuev's avatar Igor Stuev Committed by GitHub

Merge pull request #831 from blockscout/fix-log-event

fix log event
parents 4aedf744 9dc16293
import mixpanel from 'mixpanel-browser';
import appConfig from 'configs/app/config';
import type { EventTypes, EventPayload } from './utils';
type TrackFnArgs = Parameters<typeof mixpanel.track>;
......@@ -10,5 +12,8 @@ export default function logEvent<EventType extends EventTypes>(
optionsOrCallback?: TrackFnArgs[2],
callback?: TrackFnArgs[3],
) {
if (!appConfig.mixpanel.projectToken) {
return;
}
mixpanel.track(type, properties, optionsOrCallback, callback);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment