Google Complains This Script is Malicious

I have written a JavaScript analytics tracking script for one of my client. Basically, the script source link is generated using a dynamic GUID and an example of the link is https://whoshouldisee.azurewebsites.net/scripts/F68ADA02-D003-4A56-9BA1-34051CD50381.min.js. This link then points to some dynamic snippets of JavaScript codes which looks like this:

$  response={}; $  response.host=location.hostname; $  response.page=document.URL; $  response.referrer=document.referrer; $  response.UserID='F68ADA02-D003-4A56-9BA1-34051CD50381'; window.onload=function(){setInterval(function(){var esc=encodeURIComponent,query=Object.keys($  response).map(a=>esc(a)+'='+esc($  response[a])).join('&'); fetch('https://whoshouldisee.azurewebsites.net/load/?'+query,{mode:'no-cors',headers:new Headers({'Access-Control-Allow-Origin':'*','Access-Control-Allow-Headers':'Content-Type'})}).then(function(a){console.log('Request succeeded with JSON response',a)}).catch(function(a){console.log('Request failed',a)});},5000);}

This snippet then gives the server the necessary information about the website visitor and the web page. It has been working well on websites until a client uses google webmasters and analytinecessary information about the website visitor and the web page. It has been working well on websites until a client has used it on a website cs tools integrated it on their website, Google has been complaining that the script contains a malicious content, and we were unable to figure out what exactly the malicious content was. We also tried to contact Google but they won’t give a viable reason. They are just complaining the script is malicious without given a reason, not even q guide or principle to follow to ensure a safe script.

Please can anyone take a look at the code and help suggest any approach that could make google flag this as malicious, how also state approaches and corrections to make to make google remove this as a malicious scripts. Thank you so much.