Skip to content

Show visits sent by AI assistants without an account - #134

Merged
cport1 merged 1 commit into
mainfrom
feat/local-ai-referrals
Nov 16, 2026
Merged

cport1 merged 1 commit into
mainfrom
feat/local-ai-referrals

Conversation

@cport1

@cport1 cport1 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

AI referral counts (visits that arrive from a link in ChatGPT, Perplexity, Claude, Gemini, Copilot and others) were only counted on sites connected to WebDecoy Cloud, and only shown there. Now every install counts them locally, free, with no account.

  • New table webdecoy_ai_referral_days (UTC day, platform, landing path, count), kept 30 days, pruned on the hourly cleanup. Up to 1,000 landing paths a day; past that a referral still counts for its platform under an empty path, so platform totals stay exact. Schema version 2.13.0.
  • Dashboard widget: "Visits sent by AI assistants (7 days)", top 5 platforms.
  • Statistics page: "Visits Sent by AI Assistants (30 Days)", by platform plus the top 20 landing pages.
  • Connected sites still queue and send counts to WebDecoy Cloud exactly as before. The webdecoy_count_ai_referrals filter still turns all counting off.
  • Privacy: same as the cloud counter. Only platform, path (no query string) and a number. Nothing about the visitor.
  • observe() now counts only after register() turned counting on.
  • Uninstall drops the new table. The multisite uninstall list was also missing webdecoy_crawler_visits; added.

Tests: tests/AiReferralLocalTest.php. It covers local counting with no key and no cloud queueing, local plus cloud when connected, waiting for the schema, and the summary fold. Reverting to connected-only counting fails the first test.

AI referral counts were kept only on sites connected to WebDecoy Cloud and
shown only there. Every install now keeps daily counts per AI product and
landing page for 30 days and shows them on the dashboard widget (7 days)
and the Statistics page (30 days). Counts only: nothing about a visitor.
Connected sites still send their counts to WebDecoy Cloud as before.
@cport1
cport1 merged commit ba65625 into main Nov 16, 2026
4 checks passed
@cport1 cport1 mentioned this pull request Nov 16, 2026
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