How to Exclude Google Analytics When Running Under Hugo Local Server

Perhaps I have totally misunderstood!

Say we have 1 VPS, 2 domains (site.com, dev.site.com).

site.com pulls from master.
dev.site.com pulls from testing.

If we do export HUGO_ENV=production it will then conflict with the dev.site.com testing branch, which expects the HUGO_ENV= testing.

Since there can be only one HUGO_ENV (per user on the server), either you’d have to create more users, or you’d have to buy another server.

Unless I have totally misunderstood something. I might have.