Setup
Web SDK
Install and configure Hardal for your web applications
Installation
Add the following script to your HTML file, preferably in the <head>
section:
Configuration Options
The web integration supports the following configuration options:
Option | Type | Default | Description |
---|---|---|---|
autoPageview | boolean | true | Automatically track page views |
fetchFromGA4 | boolean | true | Collect events from Google Analytics 4 |
fetchFromDataLayer | boolean | true | Collect events from dataLayer |
Troubleshooting
Validation
To validate your web integration:
- Open your browser’s developer tools
- Go to the Network tab
- Refresh your page
- Look for requests to your Hardal endpoint
- Verify that events are being sent successfully
Enable debug mode by setting window.hardalConfig.debug = true
to see detailed logging in the browser console.
Was this page helpful?