Skip to content

feat: embed analytics

Olivier Goulet requested to merge oliviergoulet/solstice-assets:analytics into main

If cookies are accepted, the script will look at window.analyticsConfig and build the needed vendor scripts for the specified services.

This works for:

  • Umami
  • Counter.dev
  • GTM

For Hugo sites, the analyticsConfig will be created via a partial which reads analytics-related params in config.toml. E.g. It will grab the GTM ID and insert it into analyticsConfig.

This can also work with non-Hugo sites, but they will need to fill out their own window.analyticsConfig.

Edited by Olivier Goulet

Merge request reports

Loading