Features a standard nginx docker image, configured with self-signed SSL and configurations for:
- Google Analytics
- Google Tag Manager
- docker
- docker-compose
- a network that doesn't block DNS resolution of trackers, like GA/GTM
- Build:
npm run compose:build - Start:
npm run compose:up - Stop:
npm run compose:down
Access the proxy via ports 8080 (HTTP) or 4443 (HTTPS) and host name analytics-proxy.test.
You may need to add a hosts file entry 127.0.0.1 analytics-proxy.test.
Configured locations:
/gtag/jsfor Google Tag Manager/analytics.jsfor Google Analytics/r/c*,/g/c*,/j/c*and/c*to forward to Google Analytics/collectendpoint
https://analytics-proxy.test:4443/gtag/js?id=G-SOMEIDhttp://analytics-proxy.test:8080/gtag/js?id=G-SOMEIDhttp://analytics-proxy.test:8080/analytics.jshttps://analytics-proxy.test:4443/gtm.js?id=GTM-MZJ7DB9http://analytics-proxy.test:8080/g/collect?v=2&tid=G-SOMEID>m=3467347as&_p=sdoui38sdk&cid=1616603405.1673937444&ul=en-us&sr=1920x1080&uaW=1&uaa=arm&uab=64&uafvl=some-user-agent&uamb=0&uam=&uap=macOS&uapv=13.1.0&uaw=0&_s=1&sid=1675776631&sct=40&seg=0&dl=some-url&dt=some-text&en=page_view&_ss=1