Skip to content

feat(dashboard): add Next.js and TanStack installation snippets to tracking setup #1097

Open

Description

@ANSHSINGH050404

Description

On the website tracking setup page (/websites/[id]/settings/tracking), the "Install it yourself" section currently only has tabs for:

  • Script tag
  • React
  • Vue
  • Node.js

Since the majority of React users build with Next.js or TanStack Start / Router, having explicit tabs or snippets for these would improve onboarding clarity.

Motivation

  • Next.js: Developers often wonder if <Databuddy /> works directly in Server Components (app/layout.tsx), how to use NEXT_PUBLIC_DATABUDDY_CLIENT_ID, and how to configure AI agent crawler tracking (@databuddy/sdk/agents in proxy.ts/middleware.ts).
  • TanStack Router: Developers look for how to integrate tracking in __root.tsx with Vite environment variables.

Proposed Solution

  • Add a dedicated Next.js tab showing app/layout.tsx integration with NEXT_PUBLIC_DATABUDDY_CLIENT_ID.
  • Include a snippet or note for TanStack Router (__root.tsx).

Activity

  1. ANSHSINGH050404 commented on Oct 8, 2026

    @ANSHSINGH050404
    Author

    @izadoesdev the issue primarily on Next.js (since Next.js is by far the biggest missing piece), and suggest TanStack as a sub-option or note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions