Installation
Install and configure the PishonIQ SDK for your application
This guide walks through installing and configuring the PishonIQ SDK. Most teams complete setup in under ten minutes.
Install the package
npm install pishoniq
Alternative package managers:
yarn add pishoniq
# or
pnpm add pishoniq
Initialize the SDK
Import PishonIQ and initialize it with your project API key. Retrieve your key from the PishonIQ dashboard under Settings → API Keys.
import { PishonIQ } from 'pishoniq'
PishonIQ.init({
apiKey: 'YOUR_API_KEY',
})
Next.js integration
For Next.js App Router applications, initialize within a client component or root provider:
'use client'
import { useEffect } from 'react'
import { PishonIQ } from 'pishoniq'
export function AnalyticsProvider({ children }: { children: React.ReactNode }) {
useEffect(() => {
PishonIQ.init({ apiKey: process.env.NEXT_PUBLIC_PISHONIQ_KEY! })
}, [])
return <>{children}</>
}
Store your key in .env.local as NEXT_PUBLIC_PISHONIQ_KEY.
Verify the installation
Confirm the integration by sending a test event:
PishonIQ.track('sdk_installed')
The event should appear in your dashboard within seconds. Once verified, proceed to Event Tracking.