Choose one of these integrations to analyse your site traffic with Wowchemy:
- Google Analytics
- a comprehensive, widely adopted solution
- Google Tag Manager
- a service to integrate any analytics provider, including Google Analytics, without modifying any code
- Microsoft Clarity
- 百度统计
- Wowchemy JavaScript Hook
- to integrate other analytics services, paste the script provided by your analytics provider into Wowchemy’s custom scripts file
Google Analytics
If you wish to use Google Analytics, include your associated tracking ID (e.g. G-12345
) in config/_default/params.yaml
:
marketing:
analytics:
google_analytics: 'YOUR_ID'
Google Tag Manager
Tag Manager gives you the ability to easily add and update your own tags for conversion tracking, site analytics, remarketing, and more.
If you wish to use Google Tag Manager, include your associated tracking ID in config/_default/params.yaml
:
marketing:
analytics:
google_tag_manager: 'YOUR_ID'
Microsoft
If you wish to use Microsoft Clarity, include your associated tracking ID in config/_default/params.yaml
:
marketing:
analytics:
microsoft_clarity: 'YOUR_ID'
百度统计
If you wish to use 百度统计 (Baidu Tongji), include your associated tracking ID in config/_default/params.yaml
:
marketing:
analytics:
baidu_tongji: 'YOUR_ID'
Troubleshooting
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.