Files
sorsfonalak/crates/db/migrations/0048_signup_source.sql
T
fecoandClaude Opus 5.5 08ad7b0a79
CI / test (push) Successful in 3m31s
CI / build (push) Skipped
CI / deploy (push) Skipped
Admin statistics page, and where new members come from
Admin → Statisztika shows sign-ups, own charts, purchases, analyses, the
weekly horoscope's readers, forum posts and the AI cost for 7, 30 or 90
days (or since the start), day by day, the way from sign-up to payment,
and the members' sources, devices and sign-up methods.

At sign-up the site now records where the member came from (Facebook,
a search engine, another site's address, the link's campaign tags) and
the device type: the page keeps what it saw when the visit began in
memory only and sends it with the sign-up; nothing is stored in the
browser or about visitors who do not sign up. The privacy notice and
the data export include it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-27 12:10:25 +00:00

11 lines
785 B
SQL

-- Where a new member came from, for the admin statistics. Set once, at
-- sign-up, from that visit: the kind of source (Facebook, a search engine,
-- typed in…), the referring site's address without its path, or the link's
-- campaign tags, and the device type. Nothing is stored about visitors who
-- do not sign up. NULL for the members who signed up before this.
ALTER TABLE users ADD COLUMN signup_source text
CHECK (signup_source IN ('facebook', 'instagram', 'messenger', 'tiktok', 'google', 'bing', 'search',
'email', 'app', 'other', 'direct'));
ALTER TABLE users ADD COLUMN signup_detail text CHECK (char_length(signup_detail) <= 200);
ALTER TABLE users ADD COLUMN signup_device text CHECK (signup_device IN ('mobile', 'tablet', 'desktop'));