Back to Integrations
GitHub Pages Integration
Add the Pulse script to your static site's HTML template on GitHub Pages.
Method 1: Jekyll (default for GitHub Pages)
Create an analytics include with a production guard and reference it in your default layout.
_includes/analytics.html
{% if jekyll.environment == "production" %}
<script
defer
data-domain="your-site.com"
src="https://pulse.ciphera.net/script.js"
></script>
{% endif %}Then include it in your layout's <head>:
_layouts/default.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% include analytics.html %}
<title>{{ page.title }}</title>
</head>
<body>
{{ content }}
</body>
</html>Method 2: Plain HTML
For simple static sites, add the Pulse script directly to your index.html.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script
defer
data-domain="your-site.com"
src="https://pulse.ciphera.net/script.js"
></script>
<title>My Site</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>Method 3: Hugo on GitHub Pages
If you're using Hugo with GitHub Pages, follow the Hugo guide.
For more details, see the GitHub Pages docs.