Skip to main content
A Next.js integration normally uses two packages:
  • @biqli/analytics in client components to capture bq_id.
  • @biqli/sdk in server-only modules to send trusted conversions.

Add the client provider

Only the publishable key may use a NEXT_PUBLIC_ variable.

Create a server-only client

Do not import this module into a client component.

Send a lead from a route handler

Create the customer first. Track the lead only after the business action succeeds.

Send sales from trusted code

Call biqli.track.sale() from a verified payment webhook, server action, route handler, or background job. Do not treat a client redirect to a success page as proof of payment.
Keep BIQLI_API_KEY server-only. If it appears in a browser bundle, rotate it immediately.