Integrations
Visitor tag and crawler tracking
Two different populations visit your site because of AI, and they need two different instruments. People arriving from an assistant run JavaScript, so a beacon sees them. Crawlers do not run JavaScript at all, so the only thing that sees them is your server log.
1. Visitor tag — AI-referred visitors
One public script tag, on every page. Copy it with your brand’s id already filled in from the Setup tab of LLM Analytics. Paste it in the site-wide head/global custom-code area, shared layout, or tag manager; it looks like this:
<script src="https://app.ranksify.ai/api/beacon.js" data-project="YOUR_PROJECT_ID" defer></script>
It reports one pageview per load and stores a pseudonymous id in localStorage so repeat visits in the same browser group into a session. The server keeps only hits that came from an AI assistant and discards the rest — the beacon is not a general-purpose analytics tracker and is not trying to be one.
The Setup tab asks where your site is built and shows the exact paste steps for that platform — WordPress, Shopify, Wix, Squarespace, Framer, Webflow, GoDaddy, Google Tag Manager, or raw HTML — then offers to check your live page and tell you whether it can see the tag.
A successful browser check-in confirms the tag executed even on an ordinary direct visit. That does not claim an AI-referred visitor arrived; visitor receipt has its own status.
Troubleshooting the beacon
| Symptom | Cause |
|---|---|
| Tag is installed, dashboard stays empty | The beacon only keeps AI-referred hits. Ordinary traffic is dropped by design, so an empty Visitors view can simply mean no assistant has sent anyone yet. |
| Hits from a domain that is not your brand domain | The beacon accepts hits whose browser origin matches the brand domain or a subdomain of it. A snippet pasted on a staging or unrelated host is dropped, so it cannot pollute your numbers. |
| Detection says the tag is not present | The check reads raw HTML only. If your platform injects the tag client-side, a negative result means “not visible in the source”, not “not installed”. |
2. Server logs — AI crawlers
AI crawlers fetch your pages without executing a line of JavaScript. Nothing client-side can observe them. Open Advanced: track AI crawler bots on the Setup tab and use one of these routes.
Hosted builders that expose neither request logs nor a configurable edge cannot send a crawler feed directly. The visitor tag still works there. To add crawler tracking, place the domain behind an edge you control (for example Cloudflare) or use a server that can read the access logs. Never put the secret rk_… ingest token in website HTML.
Paste a log sample
The quickest way to see whether anything is happening at all. Ranksify parses Caddy JSON lines and the Apache/Nginx combined format. Paste a slice of your access log into Setup.
Push logs programmatically
For an ongoing feed, mint an ingest token from the same panel and POST raw log text to your brand’s endpoint:
curl -X POST "https://app.ranksify.ai/api/ingest/YOUR_PROJECT_ID?source=rest" \ -H "Authorization: Bearer rk_your_ingest_key" \ -H "Content-Type: text/plain" \ --data-binary @access.log
The body is the same log grammar as the paste box. source accepts rest and cf-worker; an unrecognised value is rejected with a 400 rather than being quietly recorded as something else, because where a log line came from is part of the record. The key must carry the ingest scope and be bound to the same brand as the id used in the endpoint — see API keys.
Each request is limited to 2 MiB and each log line to 16,384 characters.
Edge and platform forwarders
- A Cloudflare Worker template that forwards request logs as they happen.
- A Vercel Log Drain endpoint for Pro or Enterprise teams, configured under Team Settings → Drains, which accepts Vercel’s native format directly.
Both are generated for you, with the token filled in, from the Setup tab.
Which crawlers are recognised
Ranksify identifies AI crawlers by user agent, including GPTBot, ChatGPT-User, OAI-SearchBot, ClaudeBot, Claude-SearchBot, Claude-Web, Claude-User, anthropic-ai, PerplexityBot, Perplexity-User, Google-Agent, Applebot, Bytespider, CCBot, cohere-ai and Meta-ExternalAgent.
Reading the results
- Overview — crawl and visit activity together.
- Pages — which URLs the bots and the visitors actually wanted.
- Crawlers — observed bots and their activity.
- Visitors — the humans the beacon attributed to an assistant.
- Logs — the raw ingested lines.