analytics.js-integrations icon indicating copy to clipboard operation
analytics.js-integrations copied to clipboard

Amplitude and Madkudu integrations break with SystemJS

Open robmosca opened this issue 2 years ago • 8 comments

When trying to initialize Amplitude Classic or Madkudu in a website using SystemJS, the initialization fails with the following message:

analytics.min.js:1 Madkudu TypeError: window.require is not a function

This is due to the fact that the condition on this line is true for SystemJS, but SystemJS does not define window.require (see here and here).

Maybe to the condition on line 13 a check should be added for window.require to be defined.

robmosca avatar Jun 21 '23 14:06 robmosca