Skip to content

About

This is Hardal SDK for React

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardal

Hardal Browser SDK Helpers

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.

Package license: MIT Package version

Repository API

The functions are defined in src/index.ts:

  • sendToHardal(eventName) calls window.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.

Getting started with the published SDK

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.

Installation

npm install hardal
# or
yarn add hardal

React example

Wrap 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>
  );
}

Support

Maintained by Hardal.

About

This is Hardal SDK for React

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages