I am trying to import the trackingjs library (https://www.npmjs.com/package/tracking) into my ionic2 project.
By following the documentation (https://ionicframework.com/docs/v2/resources/third-party-libs/) I can import the lodash library and use it.
But with tracking js all I get is an empty object
import tracking from 'tracking/build/tracking';
I installed the tracking module with npm and then installed the corresponding types (https://www.npmjs.com/package/@types/tracking). I can see the code from the module in my
main.js file when using
ionic serve so it seems to be included correctly, but I can’t get it to work.
Did I miss anything obvious or is there something more to do with that library? Any help will be appreciated.