OnyxMetric
Integration Guides

Hostinger Website Builder

Add OnyxMetric analytics to your Hostinger Website Builder site

Hostinger Website Builder has a Custom code integration that adds code to every page. Script tags go at the end of <body> by default, and a data-render-head attribute moves them into <head>.

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 Hostinger Website Builder

  1. Open your site in the builder, click the more menu (three dots) at the top to open website settings, then choose Integrations.
  2. Select Custom code.
  3. Paste the snippet with data-render-head added so it loads from <head>:
<script src="https://app.onyxmetric.com/api/script.js?siteId=YOUR_SITE_ID" async data-render-head></script>
  1. Save, then click Update website to publish. Custom code runs on the live site and in preview, not in the editor.

Without data-render-head, the tracker still works from the end of <body>. The attribute just makes it load earlier.

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

  • No script.js request in the editor: expected. Integrations are injected into the published site only. Check the live URL or the preview.
  • Saved but not in the page source: click Update website after saving.
  • Site breaks with several snippets: paste them one after another, never nested. If the page still fails, remove all custom code, update, and add them back one at a time.

Next steps

On this page