OnyxMetric
Integration Guides

Duda

Add OnyxMetric analytics to your Duda site

Duda has a site-wide Header HTML panel with two fields: Head HTML, printed inside <head> on every page, and Body End HTML, printed before </body>. Use Head HTML, then republish.

Copy your tracking snippet

In OnyxMetric, open your site's Site Settings and copy the tracking script. It looks like this:

<script src="https://app.onyxmetric.com/api/script.js?siteId=YOUR_SITE_ID" async></script>

YOUR_SITE_ID is the numeric ID of your site.

Add the snippet to Duda

  1. In the editor's side panel, click More, then Settings.
  2. Click Header HTML.
  3. Paste the snippet into Head HTML and click Save.
  4. Republish the site. The editor and preview show saved code right away, but the live site only updates on republish.

Head HTML keeps <script>, <link>, and <meta> tags and strips anything else. The tracking snippet is a single <script>, so it survives.

To track one page only, open that page's settings (gear icon), choose SEO, and paste the snippet into that page's Header HTML.

Check that it works

Load your live site and click through a few pages. Pageviews show up in the OnyxMetric dashboard within seconds.

If nothing arrives:

  • View the page source and search for script.js?siteId= to confirm the tag is present.
  • In the browser's Network tab, check that script.js returns 200 and that requests go to /api/track.
  • Turn off ad blockers, or proxy the script through your own domain.
  • Read script troubleshooting for other causes.

Troubleshooting

  • Saved but not in the live source: the site was not republished. Republish after every Header HTML change.
  • Code disappears after saving: paste only the script tag, with no wrapping HTML or comments.
  • Consent management app in use: Duda loads Head HTML before a consent banner can intercept it. To gate tracking behind consent, put the snippet in Body End HTML instead.

Next steps

On this page