---
title: "Hugo"
description: "Add Pulse analytics to your Hugo site via a partial or base template."
category: "ssg"
brandColor: "#FF4088"
officialUrl: "https://gohugo.io/documentation"
relatedIds: ["jekyll", "eleventy", "astro"]
date: "2026-03-28"
---
Add the Pulse script via a Hugo partial or directly in your base template.
---
## Method 1: Create a partial
Create an analytics partial with a production guard using Hugo's `.Site.IsServer` flag.
{`{{ if not .Site.IsServer }}
{{ end }}`}
## Method 2: Include the partial in your base layout
Add the partial to your `baseof.html` layout.
{`
{{ partial "analytics.html" . }}
{{ .Title }}
{{ block "main" . }}{{ end }}
`}
For more details, see the [Hugo partials docs](https://gohugo.io/templates/partials/).