Linkjolt
Sign InStart Free
Next.js Integration

Next.js Affiliate Tracking

Add affiliate tracking to your Next.js app in 1 minute. Full App Router support, Server Components compatible, zero performance impact.

Start Free TrialView Code Example

Next.js 13+ Ready

βœ“

App Router & Server Components

βœ“

TypeScript & ESM support

βœ“

Server Actions & API Routes

βœ“

Zero performance impact

Built for Modern Next.js

Native support for App Router, Server Components, and TypeScript

App Router Compatible

Full support for Next.js 13+ App Router. Works seamlessly with Server Components, Client Components, and Route Handlers.

Zero Performance Impact

Async script loading with strategy="afterInteractive". <5KB gzipped, doesn't block rendering or affect Lighthouse scores.

Server-Side Tracking

Track conversions from API routes and server actions. Full SSR support with automatic cookie handling.

RSC-Safe Implementation

React Server Component compatible. No hydration issues, proper client/server boundary handling.

TypeScript Support

Fully typed SDK with TypeScript definitions. Autocomplete for all tracking methods and conversion events.

Real-Time Analytics

Track clicks, conversions, and revenue in real-time. 12-month data retention with detailed performance insights.

Implementation Examples

Client-Side Tracking

Add to root layout for automatic click tracking

// app/layout.tsx (or pages/_app.tsx)
import Script from 'next/script'

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <Script
          src="https://www.linkjolt.io/api/tracking.js?id=YOUR_MERCHANT_ID"
          strategy="afterInteractive"
        />
      </body>
    </html>
  )
}
Server-Side Conversions

Track from API routes or Server Actions

// app/success/page.tsx (thank-you page)
'use client'

import { useEffect } from 'react'

export default function SuccessPage({ searchParams }) {
  useEffect(() => {
    // Manual conversion tracking
    if (typeof window !== 'undefined' && window.linkjolt) {
      window.linkjolt.trackPurchase(amount, { orderId })
    }
  }, [])
  
  return <div>Thank you for your purchase!</div>
}

// OR use Stripe/Paddle webhooks for automatic tracking (preferred)
"Linkjolt made affiliate programs easy for us. Some of the other platforms were very difficult and clunky to use, but this UI is so simple and it just works. Highly recommend!"
Henry

Henry

Founder at multiple startups

PRICING

Simple Pricing

Choose the perfect plan for your business. Start with a 3-day free trial.

No hidden fees

Cancel anytime

0% transaction fees

Monthly
Annual
Save 30%
Starter
For Small Teams
$13.99/month, billed annually

Up to $5,000/month earned from affiliates

0% Transaction Fees

What's included
  • βœ“

    5 active campaigns

  • βœ“

    50 affiliate invites per month

  • βœ“

    10 active affiliates

  • βœ“

    Advanced analytics (3-month data retention)

  • βœ“

    Email support

  • βœ“

    Standard affiliate tracking

  • βœ“

    Fraud detection system

  • βœ“

    Stripe payout integration

  • βœ•

    Unlimited campaigns

  • βœ•

    Unlimited affiliate invites

  • βœ•

    Unlimited affiliates

  • βœ•

    Custom commission structures

  • βœ•

    Bulk payouts

Get Started
MOST POPULAR
Professional
Most Popular
$27.99/month, billed annually

Up to $25,000/month earned from affiliates

0% Transaction Fees

What's included
  • βœ“

    Unlimited active campaigns

  • βœ“

    Unlimited affiliates

  • βœ“

    Unlimited affiliate invites

  • βœ“

    Advanced analytics (12-month data retention)

  • βœ“

    Priority chat and email support

  • βœ“

    Advanced affiliate tracking

  • βœ“

    Enhanced fraud detection

  • βœ“

    Stripe payout integration

  • βœ“

    Custom commission structures

  • βœ“

    Auto-approve affiliates option

  • βœ“

    Bulk payouts

Try Pro
Enterprise
For Large Teams
$69.99/month, billed annually

Up to $100,000/month earned from affiliates

0% Transaction Fees

What's included
  • βœ“

    Unlimited active campaigns

  • βœ“

    Unlimited affiliates

  • βœ“

    Unlimited affiliate invites

  • βœ“

    Advanced analytics (12-month data retention)

  • βœ“

    Priority chat and email support

  • βœ“

    Advanced affiliate tracking

  • βœ“

    Enhanced fraud detection

  • βœ“

    Stripe payout integration

  • βœ“

    Custom commission structures

  • βœ“

    Auto-approve affiliates option

  • βœ“

    Bulk payouts

  • βœ“

    Automated payout management

Get Enterprise

Frequently Asked Questions

Does LinkJolt work with Next.js App Router?

Yes. LinkJolt fully supports Next.js 13+ App Router. Add the tracking script to your root layout using the Next.js Script component with strategy="afterInteractive". The script handles click tracking automatically via cookies and localStorage.

Can I use LinkJolt with Next.js Server Components?

Yes. The LinkJolt tracking script is RSC-safe and works with React Server Components. Add it to your root layout - it runs client-side without causing hydration issues. For conversion tracking, use linkjolt.trackPurchase() on your success page or integrate Stripe/Paddle for automatic webhook tracking.

How do I track conversions in Next.js API routes?

You have two options: (1) Call linkjolt.trackPurchase(amount, {orderId}) from your thank-you/success page, or (2) Use Stripe or Paddle as your payment processor for automatic webhook-based conversion tracking (recommended). Both methods work with App Router and Pages Router.

Does affiliate tracking affect Next.js performance?

No. LinkJolt script is async and loads after interactive using Next.js Script component. It does not block rendering or affect Lighthouse scores. The script is lightweight, uses passive event listeners, and has zero impact on Core Web Vitals or page speed.

Can I track conversions from Server Actions?

For conversions with Stripe or Paddle, LinkJolt automatically tracks via webhooks - no Server Action code needed. The tracking happens server-side through payment processor webhooks that hit LinkJolt directly.

Is TypeScript supported?

Yes. LinkJolt provides full TypeScript support with type definitions for all tracking methods, conversion events, and API responses. Install @linkjolt/nextjs package for typed integration.

Ready to Add Affiliate Tracking?

Start your 3-day free trial. Add the tracking script to your Next.js app in 1 minute.

Start Free TrialView Pricing
LinkJolt

The all-in-one affiliate management platform for SaaS companies.

Product
Solutions
SaaS StartupsEnterprise SaaSContent CreatorsMarketing AgenciesSaaS Affiliate ProgramsZero Transaction FeesFraud PreventionRecurring CommissionsTrial AttributionEasy OnboardingGlobal PayoutsNo-Code SetupπŸ‡¬πŸ‡§ United KingdomπŸ‡ΊπŸ‡Έ United StatesπŸ‡©πŸ‡ͺ GermanyπŸ‡³πŸ‡± NetherlandsπŸ‡ΈπŸ‡ͺ SwedenπŸ‡«πŸ‡· France

Β© 2025 LinkJolt. All rights reserved.

GDPR Compliant Badge

Made with β™₯ for SaaS companies