All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cjs.initializers.mixpanel.js.map Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
{"version":3,"file":"mixpanel.js","names":["_mixpanelBrowser","_interopRequireDefault","require","initializeMixpanel","skip","_globalProps$user","_globalProps$organiza","analyticsId","concat","globalProps","user","email","organization","subdomain","mixpanelProjectToken","mixpanel","_globalProps$user2","_globalProps$user3","_globalProps$user4","_globalProps$user5","_globalProps$organiza2","init","people","set","$first_name","firstName","$last_name","lastName","$email","identify"],"sources":["../../../src/initializers/mixpanel.js"],"sourcesContent":["import mixpanel from \"mixpanel-browser\";\n\nexport default function initializeMixpanel(skip) {\n  const analyticsId = `${globalProps.user?.email}-${globalProps.organization?.subdomain}`;\n\n  if (globalProps.mixpanelProjectToken && !skip?.mixpanel) {\n    mixpanel.init(globalProps.mixpanelProjectToken);\n    mixpanel.people.set({\n      $first_name: globalProps.user?.firstName,\n      $last_name: globalProps.user?.lastName,\n      $email: globalProps.user?.email,\n      user: globalProps.user?.email,\n      subdomain: globalProps.organization?.subdomain,\n    });\n    mixpanel.identify(analyticsId);\n  } else {\n    /*\n  We need to initialize mixpanel with a bogus token in development and test environment to\n  prevent mixpanel library from throwing an error when we use mixpanel.track() method in react components.\n  */\n    mixpanel.init(\"TEST_TOKEN\");\n  }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEe,SAASC,kBAAkBA,CAACC,IAAI,EAAE;EAAA,IAAAC,iBAAA,EAAAC,qBAAA;EAC/C,IAAMC,WAAW,MAAAC,MAAA,EAAAH,iBAAA,GAAMI,WAAW,CAACC,IAAI,cAAAL,iBAAA,uBAAhBA,iBAAA,CAAkBM,KAAK,OAAAH,MAAA,EAAAF,qBAAA,GAAIG,WAAW,CAACG,YAAY,cAAAN,qBAAA,uBAAxBA,qBAAA,CAA0BO,SAA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