chmln
chmln copied to clipboard
Easily add Chameleon to your product
I'm using this library in an angular TS app, and get optimization bailout warnings because this doesn't support ES Modules, and cannot be tree shaken. I can ignore/silence these warnings,...
Related to listening to events > https://developers.chameleon.io/#/js/listen
At the moment, this library loads `messo.min.js` via the Chameleon CDN: https://github.com/chamaeleonidae/chmln/blob/47579523236b62ef4362e0d7deb6541a70dd5ef4/index.js#L13-L17 This has some adverse implications: * It means that users of this package need to allow loading scripts...
Can you please help?
So I have this react (next.js actually) implementation: ``` useEffect(() => { if (!window?.chmln && !!user) { chmln.init(CHAMELEON_API_KEY, { fastUrl: 'https://fast.chameleon.io/' }); chmln.identify(user.id, { name: `${user.firstName} ${user.lastName}`, }); } if...