# Google Analytics Nginx Proxy
Google PageSpeed Insights flags browser caching of Google Analytics:
> Leverage browser caching
Set up a proxy in your Nginx configuration file to address this issue.
### Source
https://www.johnvincent.io/nginx-proxy-google-analytics/
server {
### ...
location = /analytics.js {
# Proxy to google-analytics.com
proxy_pass https://www.google-analytics.com;
# Custom expires time
expires 1y;
}
}