Fetch API Javascript Expired Coding Creating issues in the navigation beacon

Hello so I’m kinda stuck I’ve been trying to fix the fetch api in my stores coding because the browser navigation beacon in the javascripts api is outdated and expired so its causing a deprecation to occur. This is causing a problem in the visual stability of my store for my customers and could very well be the reason conversions are just not there. Can anyone help me fix this?