Hello @dcgty342023
Thank you for reaching out to us, AMP does not allow custom JavaScript, so the AMP plugin removes custom JavaScript to create a valid AMP pages.
You can try using amp-script component to add custom JavaScript, but it runs with limitations as it web worker.
We hope this helps!
@dcgty342023 As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.