There are two ways to connect a Vercel site. Use Edge Middleware on any plan, or a Log Drain if you are on Pro or above and prefer no code.
Prerequisites. A site deployed on Vercel and a verified domain in Rankly. Your ingest token is in Settings and is baked into the script Rankly generates.
Works on every Vercel plan, including Hobby. You add one file and deploy.
1

Add the middleware file

Save this as middleware.ts at your project root. Rankly fills in your token for you.
middleware.ts
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

const RANKLY_INGEST = 'https://ingest.tryrankly.com/ingest/vercel'
const RANKLY_TENANT_TOKEN = 'tnt_your_token'

const BOT_UA_RE = /\b(GPTBot|ChatGPT-User|OAI-SearchBot|ClaudeBot|Claude-User|PerplexityBot|Perplexity-User|Google-Extended|Bytespider|Amazonbot|Applebot-Extended|DuckAssistBot|GrokBot|CCBot|Meta-ExternalAgent|MistralAI-User|cohere-ai|Amazon-Rufus|Shop-Agent)\b/i

export const config = { matcher: '/:path*' }

export default async function middleware(req: NextRequest) {
  const ua = req.headers.get('user-agent') || ''
  const sigAgent = req.headers.get('signature-agent')
  const u = new URL(req.url)
  const isFavicon = /^\/favicon[.-]|^\/apple-touch-icon/i.test(u.pathname)
  const LLM_REF_RE = /(^|\.)(chatgpt\.com|openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|you\.com|grok\.com|mistral\.ai)$/i
  let llmReferred = false
  try { const rh = req.headers.get('referer'); if (rh) llmReferred = LLM_REF_RE.test(new URL(rh).hostname) } catch (_) {}

  if (BOT_UA_RE.test(ua) || sigAgent || isFavicon || llmReferred) {
    const payload = {
      timestamp: Date.now(),
      requestMethod: req.method,
      host: u.host,
      requestPath: u.pathname,
      requestUserAgent: ua,
      clientIp: (req.headers.get('x-forwarded-for') || '').split(',')[0].trim() || null,
      referer: req.headers.get('referer') || null,
      requestId: req.headers.get('x-vercel-id') || null,
      signatureAgent: sigAgent,
      signatureInput: req.headers.get('signature-input'),
      signature: req.headers.get('signature'),
    }
    fetch(RANKLY_INGEST + '?tenant=' + RANKLY_TENANT_TOKEN, {
      method: 'POST',
      headers: { 'content-type': 'application/json' },
      body: JSON.stringify(payload),
      keepalive: true,
    }).catch(() => {})
  }
  return NextResponse.next()
}
2

Commit and deploy

Push your change. Vercel deploys the middleware to its edge, where it runs on every request.
3

Send a test request

curl -A "GPTBot/1.0" https://your-domain.com/
Vercel can take a few minutes to deploy globally; then events appear within a minute.