This repository contains small TypeScript helpers for interacting with an existing Hardal browser tracker. Its package metadata uses the name hardak; the published JavaScript and React SDK is maintained separately in usehardal/hardal.
The functions are defined in src/index.ts:
sendToHardal(eventName)callswindow.hardal.trackEvent(eventName)when a tracker is already available.loadMyLib()contains an empty script URL and a placeholder website ID. It requires implementation before it can load a real tracker.
These helpers target a browser environment. This repository does not export HardalProvider.
For JavaScript or React integrations, use the published hardal package and follow its README. The installation commands and React example below refer to that package.
npm install hardal
# or
yarn add hardalWrap your app in the published SDK's HardalProvider and provide your website ID and endpoint:
'use client';
import { HardalProvider } from 'hardal/react';
export function Providers({ children }: { children: React.ReactNode }) {
return (
<HardalProvider
config={{
website: 'YOUR_WEBSITE_ID',
hostUrl: 'https://YOUR_SIGNAL_ENDPOINT',
}}
autoPageTracking={true}
>
{children}
</HardalProvider>
);
}Maintained by Hardal.