Serve static assets with an efficient cache policy - Google Analytics - caching

After Google Lighthouse check it detect that some scripts can be cached. On of it is Google Analytics (analytics.js). But I can't change Google's heaeders, so how to fix this warning in Google Lighthouse?

It is something related to the server configuration. You can't fix this with code as far as I know.

Related

HTTP insecure workaround for Firebase

As far as I know, Firebase does not allow any http endpoints, and Baidu Maps API does not have an https endpoint available. Any potential workarounds for getting Baidu Maps to work in a Firebase application?
I can't use Google Maps because this is a web-app for China. I think Bing Maps might be an option if I can't get Baidu Maps to work.
Please refer to this answer: https://stackoverflow.com/a/36069560/1342816
Basically is to add "&s=1" at the end of script src.

How can I use googles document editing services to my website?

I would like to be able to integrate google docs functions to my own website. How could I use googles api but store documents on my own server?
I have seen some solutions such as https://owncloud.com/owncloud-overview . But I was wondering if google had its own solution or if there is something better out there?
Not possible. At most you can sync them with your server.

Using Google Analytics with a Third-Party Checkout (Magento)

We currently have a Drupal site that is content-focused and are using Google Analytics for metrics. We are partnered with a company that has a Magento site and cart and will be using them for eCommerce. How do I successfully add our GA tracking code to their domain and cart pages to ensure I am tracking conversions from acquisition to checkout success (or dropout)?
Is it just the simple cross-domain code outlined in the Google knowledgebase?
Thanks in advance
Yep, should be as simple as cross-domain tracking. Your best bet would be to setup a staging/dev environment to test things out and then push to production.
You can use tools to monitor the http requests getting sent to the server to make sure your tracking is working.
For Firefox, I use HTTPFox and for Chrome it's Google's homegrown Google Analytics Debugger.
Best of luck!

API for getting visitors statistic of heroku app

Does heroku have an API for getting visitors statistic to my web app hosted on their site?
i don't really want to use Google analysis.
No it doesn't. Google (uh) for alternatives if you don't want to use Google Analytics - there are quite a few.

Do apps deployed to xxx.herokuapp.com get crawled by google?

Just wondering if there is any risk that I could prematurely share a website with the world by uploading to heroku for testing purposes? Thanks
Yes, they do. They are a website on the web just like any other.
Google will still respect a robots.txt file etc, and you could apply htaccess auth to your application to stop people getting in if needed.

Resources