Generalize analytics support in default theme

As the number of privacy-preserving analytics options proliferates,
it no longer makes sense to support specific solutions provided by
ad-tracking corporations.
This commit is contained in:
Justin Mayer 2023-08-03 14:05:17 +02:00
commit 639173da6b
4 changed files with 13 additions and 49 deletions

View file

@ -67,7 +67,7 @@ Deployment
After you have generated your site, previewed it in your local development
environment, and are ready to deploy it to production, you might first
re-generate your site with any production-specific settings (e.g., analytics
re-generate your site with any production-specific settings (e.g., analytics,
feeds, etc.) that you may have defined::
pelican content -s publishconf.py

View file

@ -1245,18 +1245,19 @@ Feel free to use them in your themes as well.
Your GitHub URL (if you have one). It will then use this information to
create a GitHub ribbon.
.. data:: GOOGLE_ANALYTICS
.. data:: ANALYTICS
Set to ``UA-XXXXX-Y`` Property's tracking ID to activate Google Analytics.
Put any desired analytics scripts in this setting in ``publishconf.py``.
Example:
.. data:: GA_COOKIE_DOMAIN
.. parsed-literal::
Set cookie domain field of Google Analytics tracking code. Defaults to
``auto``.
.. data:: GOSQUARED_SITENAME
Set to 'XXX-YYYYYY-X' to activate GoSquared.
ANALYTICS = """
<script src="/theme/js/primary-analytics.js"></script>
<script>
[ … in-line Javascript code for secondary analytics … ]
</script>
"""
.. data:: MENUITEMS