Calling tracking Java script from AMP pages

We are using in house tracking mechanism for our website. We use our tracking.js file on our all pages.

Every page sent some info in an js object to this script file which later send this information to our tracking application using spring controller.

Now as to move page faster we use some page sin AMP templates.
But this does not allow us to use tracking.js

We tried iframe tag but it does not allow to use http call (it only allow https calls)

Could you please suggest a way to do it as it very crtical and we can not move to https right now for other limitation.

Virendra Agarwal

Source: stackoverflow-javascript