UNPKG

realm-object-server

Version:

Realm Object Server

24 lines 749 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Mixpanel = require("mixpanel"); let realMixPanel; let distinctId; exports.mixpanel = { identify: (id, company) => { if (company && (company.toLowerCase() === "realm" || company.match(/.+@realm\.io$/g))) { return; } distinctId = id; realMixPanel = Mixpanel.init("953cbc7bc5e8daa02b91425ac92d36dd"); realMixPanel.people.set(distinctId, { Company: company, }); }, track: (event, payload) => { if (!realMixPanel) { return; } realMixPanel.track(event, Object.assign({ distinct_id: distinctId }, payload)); } }; //# sourceMappingURL=mixpanel.js.map