Install Simple Analytics with Hugo
You can embed our script in Hugo using their feature called “Base Template”. On this page we will explain how to use this feature and help you installing the Simple Analytics script with Hugo.
Follow these steps to add Simple Analytics to your website:
- Open your project
- Find your base template (usually in
layouts/_default/baseof.html
)- If it does not exist, create it.
- Copy the embed script just before the
</body>
tag - Save and build the project
If you have a footer block in your base template you can also choose to paste the embed script there.
If you encounter issues, don’t hesitate to contact us via our support channels.