Initializes OpenPanel SDK for server‑side tracking with API credentials from env. Reuse for any server analytics integration.
// Source: https://github.com/mperkins0155/llms-txt-hub | License: MIT | Copyright 2025 David Dias
// Provided via justclaw.it.com; keep this notice with the code.
import 'server-only'
import { OpenPanel } from '@openpanel/sdk'
const OPENPANEL_API_URL = 'https://stats.daviddias.digital/api'
export const opServer = new OpenPanel({
apiUrl: OPENPANEL_API_URL,
clientId: process.env.NEXT_PUBLIC_OPENPANEL_CLIENT_ID ?? '',
clientSecret: process.env.OPENPANEL_CLIENT_SECRET ?? ''
})
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key