Docs
Open Okidoki

Install on Hugo

In Hugo the line goes in the template that makes the head of every page.

Hugo does not write code for you, but it has a box for code that goes in the head of every page. Paste one line there and you are done.

#Before you start

Sign in to Okidoki and add your site. On the setup page, choose With a site builder and copy the line. It looks like this, with your own site key:

The script tag
<script defer data-site="ok_your_site_key" src="https://okidoki.sh/js/okidoki.js"></script>

#Install on Hugo

  1. Find the template with <head>, usually layouts/partials/head.html or layouts/_default/baseof.html.
  2. If it lives in your theme, copy the file to the same place in your own layouts folder first, so a theme update does not remove it.
  3. Paste the script tag inside <head>, then build and deploy.
  4. Open your published site once in a normal browser window.

The setup page in Okidoki turns green as soon as the first visit arrives. See Check that it works.

#Good to know on Hugo

  • Many themes have an empty partial for your own head code, like extend_head.html or custom-head.html. Check your theme’s README. That is the easiest place.

Okidoki sets no cookies and collects no personal data, so it needs no cookie banner. If your builder offers to add one for analytics, you can usually say no. Read more in Privacy and GDPR.