Add analytics

Choose one of these integrations to analyse your site traffic with Wowchemy:


If you wish to use Google Analytics or Google Tag Manager, include your associated tracking ID (e.g. UA-12345678-9) in config/_default/params.yaml:

  google_analytics: ""
  google_tag_manager: ""


If you wish to use Microsoft Clarity, include your associated tracking ID in config/_default/params.yaml:

  microsoft_clarity: ""

[Requires Wowchemy v5.0.0.beta1+]


If you wish to use 百度统计 (Baidu Tongji), include your associated tracking ID in config/_default/params.yaml:

  baidu_tongji: ""

[Requires Wowchemy v5.1+]


The integrated analytics track users on your live production website and not your own views on your development site, if you have one.

Hugo’s default environments are development when running the hugo serve command and production when running the hugo command. You can explicitly set the environment to production with HUGO_ENV or Hugo’s --environment option.

If you deploy with Netlify, the production environment should already be setup in your netlify.toml file, but if not, check that your Netlify settings in netlify.toml are similar to the latest Netlify settings in the Academic template.

If you choose to use Google Tag Manager, you can configure alternative analytics solutions, or even Google Analytics, in the Google Tag Manager admin panel.

We recommend testing that your analytics are working as expected. If they are not, check that your production environment is as described above and check that your site URL in your Google/Microsoft admin panel matches your site’s URL. Furthermore, Google and Microsoft provide troubleshooting guides to help with any issues.