Skip to content
NETMETRİKDocumentation

DocumentationEmbed code and allowed domains

Embed code and allowed domains

You can embed the widget on your site in two ways: script or iframe. The allowed-domains list keeps your code running only on your own sites.

Last updated: 12 July 2026

Embedding with a script (recommended)

The script method places the test inside a container on your page and adapts to the page's layout. Add the code wherever you want the test to appear:

HTML
<!-- HIZTESTI Custom -->
<div id="hiztesti-test"></div>
<script src="https://hiztesticustom.com/v1/widget.js" data-id="<WIDGET-ID>" async></script>

<div id="hiztesti-test"> is the container the test is drawn into; data-idis your widget's identifier (already filled in for you in the embed code on the portal).

Embedding with an iframe

For environments where you cannot add a script to the page (some content management systems, email dashboards, restricted editors), use the iframe alternative:

HTML
<iframe width="100%" height="650" frameborder="0"
  src="https://hiztesticustom.com/v1/embed/<WIDGET-ID>"
  title="Hız Testi"></iframe>
Height
You can adjust the height value (650) to suit your page. The script method adapts to the container's width, so it is more flexible for most layouts.

Allowed domains (allowlist)

The widget only runs on the domains you specify — this prevents others from using your code on their own site and consuming your quota (hotlinking). You can add entries to the Allowed domains section of the configuration in the following formats:

EntryMeaning
kurum.comThis domain only
*.kurum.comAll subdomains (e.g. www.kurum.com, test.kurum.com)
kurum.com:8080With a specific port

A domain is just the host name; do not prefix it with https:// or append a path.

Empty list = runs everywhere
If the allowed-domains list is empty, the widget runs on any site. To protect your quota and your brand, always add your own domain in production. When a test is loaded from a domain that is not permitted, the test does not start.

Live preview and trial

The Open live test page link on the configuration screen opens the widget at full size on a real page. This lets you verify the appearance and test flow before embedding it on your site. The preview panel on the right reflects setting changes instantly.

Common situations

  • Test won't start / "domain not allowed": The domain the page is published on is not in the allowlist; add it or cover subdomains with *..
  • Widget not showing: With the script method, make sure the <div id="hiztesti-test"> container is present on the page.
  • Quota exhausted: In shared-network mode the monthly quota is used up; tests resume once the period renews or you increase the quota.