I would like to know how to make it works because just paste the code in the app doesn't work.
The code generated by analytics is this:
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXX-X', 'auto');
ga('send', 'pageview');
So, I tried to config this:
"content_security_policy": "script-src 'self' http://www.google-analytics.com; object-src 'self'"
but it doesn't work because "content_security_polict" only accept HTTPS and not HTTP.
- I tried to config the path in "permission" too:
{ ... "permissions": ["https://www.google-analytics.com/analytics.js"] ... }
but it doesn't workt too.
- I tried to set HTTPS fixed in the analytics code, but doesn't work too.
In a normal web page, it loads two files:

but in my app, it loads only one:

How can I make it works?