Overview

The Hardal Web Script enables you to track user behavior and collect cookieless analytics and first-party data from your web sites.

Installation

1

Get your Hardal Script

  1. Log into your Hardal account
  2. Navigate to settings
  3. Copy your Hardal Script from “Setup” tab

2

Add the Script

Add your Hardal Script to your HTML file, preferably in the <head> section. The script should look like the following:

<script
  defer
  src="https://<your-hardal-signal-id>-signal.usehardal.com/hardal"
  data-website-id="your-hardal-signal-id"
></script>

Replace <your-hardal-signal-id> with your actual Signal ID.

3

Verify Installation

To verify your installation:

  1. Open your browser’s developer tools (F12 or right-click → Inspect)
  2. Go to the Network tab
  3. Refresh your page
  4. Look for requests to your Hardal endpoint
  5. Verify that page view events are being sent successfully
  6. Check your Hardal Dashboard to see real-time events are reflected accordingly

Custom Event Tracking

Using hardal.track()

You can use the hardal.track() method to send custom events:

hardal.track(eventName, eventProperties);

Common Event Examples (hardal.track Method)

<script>
	hardal.track("test");
</script>

Troubleshooting

Common Installation Issues