Skip to content

Add CrawlProof stats tracker - #1

Merged
ralyodio merged 1 commit into
mainfrom
crawlproof/install-stats-tracker-2026-08-30T15-31-00
Aug 30, 2026
Merged

Add CrawlProof stats tracker#1
ralyodio merged 1 commit into
mainfrom
crawlproof/install-stats-tracker-2026-08-30T15-31-00

Conversation

@crawlproof

@crawlproof crawlproof Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

This PR adds the CrawlProof stats tracker to your site.

What it does: counts pageviews by source — AI engine referrals (ChatGPT, Perplexity, Claude, Gemini…) and AI crawler hits (GPTBot, ClaudeBot, PerplexityBot…). No cookies. No PII. Rolls up to a daily counter on the CrawlProof Stats tab for your project.

What changed: one line added to packages/ui/src/components/layout.ts, just before </body>:

<script data-site="43769ccb-9264-4172-9cb7-1737b62947ce" src="https://crawlproof.com/stats.js" async></script>

Docs: https://crawlproof.com/docs/stats-tracker
Disable: flip the tracker off on your CrawlProof project Stats tab and the script becomes a no-op (or remove this line).

@ralyodio
ralyodio merged commit ab9b56c into main Aug 30, 2026
3 checks passed
@ralyodio
ralyodio deleted the crawlproof/install-stats-tracker-2026-08-30T15-31-00 branch August 30, 2026 15:33
ralyodio added a commit that referenced this pull request Aug 30, 2026
PR #1 pasted a third-party <script> straight into layout.ts. On this board that
tag never runs: the policy is script-src 'self' with no 'unsafe-inline'
anywhere, so it is blocked — silently, which is the worst way for analytics to
fail, because the page looks perfect and simply records nothing.

Widening the policy has to be the plugin's doing rather than the layout's, so
that switching the plugin off takes the permission with it. The grant is also
conditional on being used: script-src and connect-src are only widened when an
analytics ID is actually set, so a board that does not want analytics ships no
third-party script and no third-party permission.

The site ID is a plugin setting now, alongside the ad slot.

105 tests, 0 type errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant