As the person who first bifurcated the Pelican settings file, I recommend thinking of two main operating modes: local deployment of development and production (i.e. pelicanconf.py and publishconf.py , respectively).
Moving GOOGLE_ANALYTICS from publishconf.py to pelicanconf.py not recommended. When developing locally, settings for things like Google Analytics and Disqus are deliberately excluded from pelicanconf.py by design. Including these settings in local testing can have adverse consequences: inaccurate site statistics, false comment streams, and other unforeseen side effects.
When it's time to publish your site, then of course you want to enable these settings. The way to do this is to ensure that your publishconf.py to the time of publication:
pelican content -s publishconf.py
If you are using the Fabric or Make Automation framework that wraps the pelican command, you can use:
fab publish
... or...
make publish
I recommend a close look at how you publish your site, ensuring that the appropriate settings file is used during the local development and production deployment, respectively.
Justin mayer
source share