[{"data":1,"prerenderedAt":1714},["ShallowReactive",2],{"article-alternates":3,"article-\u002Fit\u002Fdata\u002Fprivacy-first-analytics-plausible-server-side-aggregation":13},{"i18nKey":4,"paths":5},"data-006-2026-05",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11,"tr":12},"\u002Fde\u002Fdata\u002Fprivacy-first-analytics-plausible-server-aggregation","\u002Fen\u002Fdata\u002Fprivacy-first-analytics-plausible-server-side-aggregation","\u002Fes\u002Fdata\u002Fprivacy-first-analytics-plausible-server-side-aggregation","\u002Ffr\u002Fdata\u002Fanalytique-respectueuse-donnees-confidentielles","\u002Fit\u002Fdata\u002Fprivacy-first-analytics-plausible-server-side-aggregation","\u002Fru\u002Fdata\u002Fprivacy-first-analytics-plausible-server-side","\u002Ftr\u002Fdata\u002Fprivacy-first-analytics-plausible-ve-sunucu-tarafi-aggregation",{"_path":10,"_dir":14,"_draft":15,"_partial":15,"_locale":16,"title":17,"description":18,"publishedAt":19,"modifiedAt":19,"category":20,"i18nKey":4,"tags":21,"readingTime":27,"author":28,"body":29,"_type":1708,"_id":1709,"_source":1710,"_file":1711,"_stem":1712,"_extension":1713},"data",false,"","Privacy-First Analytics: Plausible e Aggregazione Lato Server","Misurazione conforme KVKK\u002FGDPR: Plausible + server-side aggregation per tracking senza cookie, confronto con GA4 e architettura production.","2026-05-19","verianalizi",[22,23,24,25,26],"privacy-first-analytics","plausible","server-side-tracking","cookieless","kvkk-gdpr",9,"Roibase",{"type":30,"children":31,"toc":1701},"root",[32,40,47,52,57,102,107,112,136,142,147,152,161,166,406,411,455,460,493,499,504,530,540,744,754,820,825,846,852,857,865,886,894,1591,1599,1617,1622,1628,1633,1641,1659,1667,1685,1690,1695],{"type":33,"tag":34,"props":35,"children":36},"element","p",{},[37],{"type":38,"value":39},"text","La tabella dei cookie è crollata. Chrome ha terminato i cookie di terze parti nel 2024, Safari e Firefox li bloccano già da anni. I team di marketing vedono perdite di dati del 40-60% in GA4 (secondo i rapporti stessi di Google). Nel contempo, le sanzioni KVKK e GDPR hanno raggiunto 4,2 miliardi di euro in Europa nel 2025. Due pressioni: tecnica (senza cookie non c'è misurazione) e legale (il bypass del banner di consenso è illegale). L'analytics privacy-first risponde a entrambi i problemi: misurazione senza cookie, aggregazione lato server, compliance-ready.",{"type":33,"tag":41,"props":42,"children":44},"h2",{"id":43},"plausible-il-nucleo-della-misurazione-cookieless",[45],{"type":38,"value":46},"Plausible: Il Nucleo della Misurazione Cookieless",{"type":33,"tag":34,"props":48,"children":49},{},[50],{"type":38,"value":51},"Quando Plausible è stato lanciato nel 2019, era posizionato come \"alternativa a GA\". Nel 2026 è diventato una categoria: web analytics privacy-first. La differenza fondamentale è che registra gli eventi lato client non in un cookie, ma in un ID di sessione memorizzato lato server senza stato persistente. La combinazione IP + User-Agent genera un hash (SHA-256), questo hash viene azzerato ogni 24 ore. Risultato: conteggio dei visitatori unici con accuratezza >95%, ma nessun PII (personally identifiable information) memorizzato.",{"type":33,"tag":34,"props":53,"children":54},{},[55],{"type":38,"value":56},"Se confrontiamo con GA4:",{"type":33,"tag":58,"props":59,"children":60},"ul",{},[61,73,92],{"type":33,"tag":62,"props":63,"children":64},"li",{},[65,71],{"type":33,"tag":66,"props":67,"children":68},"strong",{},[69],{"type":38,"value":70},"Ownership dei dati:",{"type":38,"value":72}," Plausible scrive gli event nella sua istanza PostgreSQL. GA4 invia a server Google, tu non puoi interrogare (tranne BigQuery export).",{"type":33,"tag":62,"props":74,"children":75},{},[76,81,83,90],{"type":33,"tag":66,"props":77,"children":78},{},[79],{"type":38,"value":80},"Dipendenza dai cookie:",{"type":38,"value":82}," GA4 si aggancia al cookie ",{"type":33,"tag":84,"props":85,"children":87},"code",{"className":86},[],[88],{"type":38,"value":89},"_ga",{"type":38,"value":91},". Se il cookie è rifiutato, la misurazione si frammentata. Plausible è cookieless da zero.",{"type":33,"tag":62,"props":93,"children":94},{},[95,100],{"type":33,"tag":66,"props":96,"children":97},{},[98],{"type":38,"value":99},"Dimensione dello script:",{"type":38,"value":101}," Plausible tracker è 1,4 KB, GA4 gtag.js è 28 KB + gtm.js 45 KB. Differenza di 50× nel caricamento della pagina.",{"type":33,"tag":34,"props":103,"children":104},{},[105],{"type":38,"value":106},"Per la conformità KVKK, il punto critico è: l'hash di Plausible non è un dato personale. L'articolo 3 KVKK richiede \"dati relativi a una persona fisica identificata o identificabile\". Un hash SHA-256 non è reversibile, quindi rientra nello stato di dato anonimizzato. Secondo TCF 2.2, non rientra nemmeno nel Purpose 1 (strictly necessary) — non hai bisogno del banner di consenso.",{"type":33,"tag":34,"props":108,"children":109},{},[110],{"type":38,"value":111},"In production, Plausible si usa in due scenari:",{"type":33,"tag":113,"props":114,"children":115},"ol",{},[116,126],{"type":33,"tag":62,"props":117,"children":118},{},[119,124],{"type":33,"tag":66,"props":120,"children":121},{},[122],{"type":38,"value":123},"Standalone:",{"type":38,"value":125}," Per siti piccoli (blog, landing page) è sufficiente da solo. Dieci righe di JS embed, dashboard pronto.",{"type":33,"tag":62,"props":127,"children":128},{},[129,134],{"type":33,"tag":66,"props":130,"children":131},{},[132],{"type":38,"value":133},"Hybrid:",{"type":38,"value":135}," In e-commerce o SaaS, Plausible tiene il traffico generale, gli event di conversione critici vanno via server-side GTM a CDP. Questo articolo si concentra sul secondo scenario.",{"type":33,"tag":41,"props":137,"children":139},{"id":138},"aggregazione-lato-server-dal-singolo-evento-alla-metrica",[140],{"type":38,"value":141},"Aggregazione Lato Server: Dal Singolo Evento alla Metrica",{"type":33,"tag":34,"props":143,"children":144},{},[145],{"type":38,"value":146},"Il secondo pilastro dell'analytics privacy-first: non registrazione basata su event, ma su metriche. GA4 registra ogni clic, scroll, pausa video come riga separata (event stream). In un sito e-commerce sono 10 milioni di event al giorno. Questo volume è sia costo che rischio privacy. La logica dell'aggregazione è semplice: riepiloga gli event lato server al momento, incrementa i counter invece di salvare l'event grezzo.",{"type":33,"tag":34,"props":148,"children":149},{},[150],{"type":38,"value":151},"Esempio di architettura:",{"type":33,"tag":153,"props":154,"children":156},"pre",{"code":155},"Client → Plausible Tracker (1,4 KB JS)\n         ↓\n      Edge Worker (Cloudflare \u002F Vercel)\n         ↓ (aggregazione effettuata)\n      Internal Event Bus (Kafka \u002F Redpanda)\n         ↓\n      Time-Series DB (TimescaleDB \u002F ClickHouse)\n",[157],{"type":33,"tag":84,"props":158,"children":159},{"__ignoreMap":16},[160],{"type":38,"value":155},{"type":33,"tag":34,"props":162,"children":163},{},[164],{"type":38,"value":165},"Aggregazione nell'edge worker:",{"type":33,"tag":153,"props":167,"children":171},{"code":168,"language":169,"meta":16,"className":170,"style":16},"-- Esempio di hypertable TimescaleDB\nCREATE TABLE page_metrics (\n  time        TIMESTAMPTZ NOT NULL,\n  page_path   TEXT NOT NULL,\n  country     TEXT,\n  views       INT DEFAULT 1,\n  bounces     INT DEFAULT 0,\n  session_dur INT DEFAULT 0\n);\n\nSELECT create_hypertable('page_metrics', 'time');\n","sql","language-sql shiki shiki-themes github-dark",[172],{"type":33,"tag":84,"props":173,"children":174},{"__ignoreMap":16},[175,187,214,238,260,277,306,332,354,362,372],{"type":33,"tag":176,"props":177,"children":180},"span",{"class":178,"line":179},"line",1,[181],{"type":33,"tag":176,"props":182,"children":184},{"style":183},"--shiki-default:#6A737D",[185],{"type":38,"value":186},"-- Esempio di hypertable TimescaleDB\n",{"type":33,"tag":176,"props":188,"children":190},{"class":178,"line":189},2,[191,197,202,208],{"type":33,"tag":176,"props":192,"children":194},{"style":193},"--shiki-default:#F97583",[195],{"type":38,"value":196},"CREATE",{"type":33,"tag":176,"props":198,"children":199},{"style":193},[200],{"type":38,"value":201}," TABLE",{"type":33,"tag":176,"props":203,"children":205},{"style":204},"--shiki-default:#B392F0",[206],{"type":38,"value":207}," page_metrics",{"type":33,"tag":176,"props":209,"children":211},{"style":210},"--shiki-default:#E1E4E8",[212],{"type":38,"value":213}," (\n",{"type":33,"tag":176,"props":215,"children":217},{"class":178,"line":216},3,[218,223,228,233],{"type":33,"tag":176,"props":219,"children":220},{"style":193},[221],{"type":38,"value":222},"  time",{"type":33,"tag":176,"props":224,"children":225},{"style":193},[226],{"type":38,"value":227},"        TIMESTAMPTZ",{"type":33,"tag":176,"props":229,"children":230},{"style":193},[231],{"type":38,"value":232}," NOT NULL",{"type":33,"tag":176,"props":234,"children":235},{"style":210},[236],{"type":38,"value":237},",\n",{"type":33,"tag":176,"props":239,"children":241},{"class":178,"line":240},4,[242,247,252,256],{"type":33,"tag":176,"props":243,"children":244},{"style":210},[245],{"type":38,"value":246},"  page_path   ",{"type":33,"tag":176,"props":248,"children":249},{"style":193},[250],{"type":38,"value":251},"TEXT",{"type":33,"tag":176,"props":253,"children":254},{"style":193},[255],{"type":38,"value":232},{"type":33,"tag":176,"props":257,"children":258},{"style":210},[259],{"type":38,"value":237},{"type":33,"tag":176,"props":261,"children":263},{"class":178,"line":262},5,[264,269,273],{"type":33,"tag":176,"props":265,"children":266},{"style":210},[267],{"type":38,"value":268},"  country     ",{"type":33,"tag":176,"props":270,"children":271},{"style":193},[272],{"type":38,"value":251},{"type":33,"tag":176,"props":274,"children":275},{"style":210},[276],{"type":38,"value":237},{"type":33,"tag":176,"props":278,"children":280},{"class":178,"line":279},6,[281,286,291,296,302],{"type":33,"tag":176,"props":282,"children":283},{"style":210},[284],{"type":38,"value":285},"  views       ",{"type":33,"tag":176,"props":287,"children":288},{"style":193},[289],{"type":38,"value":290},"INT",{"type":33,"tag":176,"props":292,"children":293},{"style":193},[294],{"type":38,"value":295}," DEFAULT",{"type":33,"tag":176,"props":297,"children":299},{"style":298},"--shiki-default:#79B8FF",[300],{"type":38,"value":301}," 1",{"type":33,"tag":176,"props":303,"children":304},{"style":210},[305],{"type":38,"value":237},{"type":33,"tag":176,"props":307,"children":309},{"class":178,"line":308},7,[310,315,319,323,328],{"type":33,"tag":176,"props":311,"children":312},{"style":210},[313],{"type":38,"value":314},"  bounces     ",{"type":33,"tag":176,"props":316,"children":317},{"style":193},[318],{"type":38,"value":290},{"type":33,"tag":176,"props":320,"children":321},{"style":193},[322],{"type":38,"value":295},{"type":33,"tag":176,"props":324,"children":325},{"style":298},[326],{"type":38,"value":327}," 0",{"type":33,"tag":176,"props":329,"children":330},{"style":210},[331],{"type":38,"value":237},{"type":33,"tag":176,"props":333,"children":335},{"class":178,"line":334},8,[336,341,345,349],{"type":33,"tag":176,"props":337,"children":338},{"style":210},[339],{"type":38,"value":340},"  session_dur ",{"type":33,"tag":176,"props":342,"children":343},{"style":193},[344],{"type":38,"value":290},{"type":33,"tag":176,"props":346,"children":347},{"style":193},[348],{"type":38,"value":295},{"type":33,"tag":176,"props":350,"children":351},{"style":298},[352],{"type":38,"value":353}," 0\n",{"type":33,"tag":176,"props":355,"children":356},{"class":178,"line":27},[357],{"type":33,"tag":176,"props":358,"children":359},{"style":210},[360],{"type":38,"value":361},");\n",{"type":33,"tag":176,"props":363,"children":365},{"class":178,"line":364},10,[366],{"type":33,"tag":176,"props":367,"children":369},{"emptyLinePlaceholder":368},true,[370],{"type":38,"value":371},"\n",{"type":33,"tag":176,"props":373,"children":375},{"class":178,"line":374},11,[376,381,386,392,397,402],{"type":33,"tag":176,"props":377,"children":378},{"style":193},[379],{"type":38,"value":380},"SELECT",{"type":33,"tag":176,"props":382,"children":383},{"style":210},[384],{"type":38,"value":385}," create_hypertable(",{"type":33,"tag":176,"props":387,"children":389},{"style":388},"--shiki-default:#9ECBFF",[390],{"type":38,"value":391},"'page_metrics'",{"type":33,"tag":176,"props":393,"children":394},{"style":210},[395],{"type":38,"value":396},", ",{"type":33,"tag":176,"props":398,"children":399},{"style":388},[400],{"type":38,"value":401},"'time'",{"type":33,"tag":176,"props":403,"children":404},{"style":210},[405],{"type":38,"value":361},{"type":33,"tag":34,"props":407,"children":408},{},[409],{"type":38,"value":410},"Ogni page view dal client segue questo flusso:",{"type":33,"tag":113,"props":412,"children":413},{},[414,427,432,437,450],{"type":33,"tag":62,"props":415,"children":416},{},[417,419,425],{"type":38,"value":418},"JS tracker ",{"type":33,"tag":84,"props":420,"children":422},{"className":421},[],[423],{"type":38,"value":424},"POST \u002Fapi\u002Fevent",{"type":38,"value":426}," → endpoint edge",{"type":33,"tag":62,"props":428,"children":429},{},[430],{"type":38,"value":431},"Edge worker calcola l'hash (IP + UA → session_id)",{"type":33,"tag":62,"props":433,"children":434},{},[435],{"type":38,"value":436},"Session store (Redis) controlla se lo stesso session_id è presente negli ultimi 30 minuti",{"type":33,"tag":62,"props":438,"children":439},{},[440,442,448],{"type":38,"value":441},"Se presente, incrementa il counter ",{"type":33,"tag":84,"props":443,"children":445},{"className":444},[],[446],{"type":38,"value":447},"views",{"type":38,"value":449}," +1, altrimenti scrive una nuova riga",{"type":33,"tag":62,"props":451,"children":452},{},[453],{"type":38,"value":454},"Dopo timeout sessione di 30 minuti viene calcolato il bounce",{"type":33,"tag":34,"props":456,"children":457},{},[458],{"type":38,"value":459},"Questa architettura fornisce 3 vantaggi rispetto a GA4:",{"type":33,"tag":58,"props":461,"children":462},{},[463,473,483],{"type":33,"tag":62,"props":464,"children":465},{},[466,471],{"type":33,"tag":66,"props":467,"children":468},{},[469],{"type":38,"value":470},"Storage: -85%.",{"type":38,"value":472}," 10M event → 200K aggregated rows",{"type":33,"tag":62,"props":474,"children":475},{},[476,481],{"type":33,"tag":66,"props":477,"children":478},{},[479],{"type":38,"value":480},"Query speed: 40× velocità.",{"type":38,"value":482}," Gli indici time-series rendono le query del dashboard sotto i 15ms",{"type":33,"tag":62,"props":484,"children":485},{},[486,491],{"type":33,"tag":66,"props":487,"children":488},{},[489],{"type":38,"value":490},"Privacy: Zero PII.",{"type":38,"value":492}," Poiché l'event grezzo non viene salvato, non c'è diritto all'oblio (GDPR Articolo 17) — i dati personali non esistono già.",{"type":33,"tag":41,"props":494,"children":496},{"id":495},"conformità-kvkkgdpr-dettagli-tecnici",[497],{"type":38,"value":498},"Conformità KVKK\u002FGDPR: Dettagli Tecnici",{"type":33,"tag":34,"props":500,"children":501},{},[502],{"type":38,"value":503},"Per rendere privacy-first analytics \"proof-proof\" dal punto di vista legale, servono 4 strati:",{"type":33,"tag":34,"props":505,"children":506},{},[507,512,514,520,522,528],{"type":33,"tag":66,"props":508,"children":509},{},[510],{"type":38,"value":511},"1. Data minimization (GDPR Articolo 5.1c):",{"type":38,"value":513}," Raccogli solo i campi necessari. Esempio: invece di salvare l'URL di provenienza completo, salva solo il dominio (",{"type":33,"tag":84,"props":515,"children":517},{"className":516},[],[518],{"type":38,"value":519},"https:\u002F\u002Fexample.com\u002Fcheckout?user=123",{"type":38,"value":521}," → ",{"type":33,"tag":84,"props":523,"children":525},{"className":524},[],[526],{"type":38,"value":527},"example.com",{"type":38,"value":529},"). È sia compliance che risparmio disco.",{"type":33,"tag":34,"props":531,"children":532},{},[533,538],{"type":33,"tag":66,"props":534,"children":535},{},[536],{"type":38,"value":537},"2. Soglia di anonimizzazione (Guida KVKK 2023):",{"type":38,"value":539}," Se un gruppo in una metrica è inferiore a 5, non mostrarlo. Nel dashboard scrivi \"\u003C 5\". Perché un gruppo di 2 persone diventa identificabile. In TimescaleDB:",{"type":33,"tag":153,"props":541,"children":543},{"code":542,"language":169,"meta":16,"className":170,"style":16},"SELECT \n  country,\n  CASE \n    WHEN COUNT(DISTINCT session_id) \u003C 5 THEN '\u003C 5'\n    ELSE COUNT(DISTINCT session_id)::TEXT\n  END AS visitors\nFROM page_metrics\nWHERE time > NOW() - INTERVAL '7 days'\nGROUP BY country;\n",[544],{"type":33,"tag":84,"props":545,"children":546},{"__ignoreMap":16},[547,559,567,579,627,657,675,688,731],{"type":33,"tag":176,"props":548,"children":549},{"class":178,"line":179},[550,554],{"type":33,"tag":176,"props":551,"children":552},{"style":193},[553],{"type":38,"value":380},{"type":33,"tag":176,"props":555,"children":556},{"style":210},[557],{"type":38,"value":558}," \n",{"type":33,"tag":176,"props":560,"children":561},{"class":178,"line":189},[562],{"type":33,"tag":176,"props":563,"children":564},{"style":210},[565],{"type":38,"value":566},"  country,\n",{"type":33,"tag":176,"props":568,"children":569},{"class":178,"line":216},[570,575],{"type":33,"tag":176,"props":571,"children":572},{"style":193},[573],{"type":38,"value":574},"  CASE",{"type":33,"tag":176,"props":576,"children":577},{"style":210},[578],{"type":38,"value":558},{"type":33,"tag":176,"props":580,"children":581},{"class":178,"line":240},[582,587,592,597,602,607,612,617,622],{"type":33,"tag":176,"props":583,"children":584},{"style":193},[585],{"type":38,"value":586},"    WHEN",{"type":33,"tag":176,"props":588,"children":589},{"style":298},[590],{"type":38,"value":591}," COUNT",{"type":33,"tag":176,"props":593,"children":594},{"style":210},[595],{"type":38,"value":596},"(",{"type":33,"tag":176,"props":598,"children":599},{"style":193},[600],{"type":38,"value":601},"DISTINCT",{"type":33,"tag":176,"props":603,"children":604},{"style":210},[605],{"type":38,"value":606}," session_id) ",{"type":33,"tag":176,"props":608,"children":609},{"style":193},[610],{"type":38,"value":611},"\u003C",{"type":33,"tag":176,"props":613,"children":614},{"style":298},[615],{"type":38,"value":616}," 5",{"type":33,"tag":176,"props":618,"children":619},{"style":193},[620],{"type":38,"value":621}," THEN",{"type":33,"tag":176,"props":623,"children":624},{"style":388},[625],{"type":38,"value":626}," '\u003C 5'\n",{"type":33,"tag":176,"props":628,"children":629},{"class":178,"line":262},[630,635,639,643,647,652],{"type":33,"tag":176,"props":631,"children":632},{"style":193},[633],{"type":38,"value":634},"    ELSE",{"type":33,"tag":176,"props":636,"children":637},{"style":298},[638],{"type":38,"value":591},{"type":33,"tag":176,"props":640,"children":641},{"style":210},[642],{"type":38,"value":596},{"type":33,"tag":176,"props":644,"children":645},{"style":193},[646],{"type":38,"value":601},{"type":33,"tag":176,"props":648,"children":649},{"style":210},[650],{"type":38,"value":651}," session_id)::",{"type":33,"tag":176,"props":653,"children":654},{"style":193},[655],{"type":38,"value":656},"TEXT\n",{"type":33,"tag":176,"props":658,"children":659},{"class":178,"line":279},[660,665,670],{"type":33,"tag":176,"props":661,"children":662},{"style":193},[663],{"type":38,"value":664},"  END",{"type":33,"tag":176,"props":666,"children":667},{"style":193},[668],{"type":38,"value":669}," AS",{"type":33,"tag":176,"props":671,"children":672},{"style":210},[673],{"type":38,"value":674}," visitors\n",{"type":33,"tag":176,"props":676,"children":677},{"class":178,"line":308},[678,683],{"type":33,"tag":176,"props":679,"children":680},{"style":193},[681],{"type":38,"value":682},"FROM",{"type":33,"tag":176,"props":684,"children":685},{"style":210},[686],{"type":38,"value":687}," page_metrics\n",{"type":33,"tag":176,"props":689,"children":690},{"class":178,"line":334},[691,696,701,706,711,716,721,726],{"type":33,"tag":176,"props":692,"children":693},{"style":193},[694],{"type":38,"value":695},"WHERE",{"type":33,"tag":176,"props":697,"children":698},{"style":193},[699],{"type":38,"value":700}," time",{"type":33,"tag":176,"props":702,"children":703},{"style":193},[704],{"type":38,"value":705}," >",{"type":33,"tag":176,"props":707,"children":708},{"style":193},[709],{"type":38,"value":710}," NOW",{"type":33,"tag":176,"props":712,"children":713},{"style":210},[714],{"type":38,"value":715},"() ",{"type":33,"tag":176,"props":717,"children":718},{"style":193},[719],{"type":38,"value":720},"-",{"type":33,"tag":176,"props":722,"children":723},{"style":210},[724],{"type":38,"value":725}," INTERVAL ",{"type":33,"tag":176,"props":727,"children":728},{"style":388},[729],{"type":38,"value":730},"'7 days'\n",{"type":33,"tag":176,"props":732,"children":733},{"class":178,"line":27},[734,739],{"type":33,"tag":176,"props":735,"children":736},{"style":193},[737],{"type":38,"value":738},"GROUP BY",{"type":33,"tag":176,"props":740,"children":741},{"style":210},[742],{"type":38,"value":743}," country;\n",{"type":33,"tag":34,"props":745,"children":746},{},[747,752],{"type":33,"tag":66,"props":748,"children":749},{},[750],{"type":38,"value":751},"3. Politica di retention dei dati:",{"type":38,"value":753}," L'Articolo 7 KVKK dice \"i dati devono essere eliminati quando lo scopo è raggiunto\". Per l'analytics il fine è: ottimizzazione delle performance. 90 giorni sono sufficienti. In TimescaleDB, compressione e retention automatiche:",{"type":33,"tag":153,"props":755,"children":757},{"code":756,"language":169,"meta":16,"className":170,"style":16},"SELECT add_retention_policy('page_metrics', INTERVAL '90 days');\nSELECT add_compression_policy('page_metrics', INTERVAL '7 days');\n",[758],{"type":33,"tag":84,"props":759,"children":760},{"__ignoreMap":16},[761,791],{"type":33,"tag":176,"props":762,"children":763},{"class":178,"line":179},[764,768,773,777,782,787],{"type":33,"tag":176,"props":765,"children":766},{"style":193},[767],{"type":38,"value":380},{"type":33,"tag":176,"props":769,"children":770},{"style":210},[771],{"type":38,"value":772}," add_retention_policy(",{"type":33,"tag":176,"props":774,"children":775},{"style":388},[776],{"type":38,"value":391},{"type":33,"tag":176,"props":778,"children":779},{"style":210},[780],{"type":38,"value":781},", INTERVAL ",{"type":33,"tag":176,"props":783,"children":784},{"style":388},[785],{"type":38,"value":786},"'90 days'",{"type":33,"tag":176,"props":788,"children":789},{"style":210},[790],{"type":38,"value":361},{"type":33,"tag":176,"props":792,"children":793},{"class":178,"line":189},[794,798,803,807,811,816],{"type":33,"tag":176,"props":795,"children":796},{"style":193},[797],{"type":38,"value":380},{"type":33,"tag":176,"props":799,"children":800},{"style":210},[801],{"type":38,"value":802}," add_compression_policy(",{"type":33,"tag":176,"props":804,"children":805},{"style":388},[806],{"type":38,"value":391},{"type":33,"tag":176,"props":808,"children":809},{"style":210},[810],{"type":38,"value":781},{"type":33,"tag":176,"props":812,"children":813},{"style":388},[814],{"type":38,"value":815},"'7 days'",{"type":33,"tag":176,"props":817,"children":818},{"style":210},[819],{"type":38,"value":361},{"type":33,"tag":34,"props":821,"children":822},{},[823],{"type":38,"value":824},"I dati più vecchi di 7 giorni vengono compressi, quelli oltre 90 giorni eliminati. Conformità all'Articolo 17 GDPR automatica.",{"type":33,"tag":34,"props":826,"children":827},{},[828,833,835,844],{"type":33,"tag":66,"props":829,"children":830},{},[831],{"type":38,"value":832},"4. Integrazione Consent Mode v2 (opzionale):",{"type":38,"value":834}," Se ancora lavori in hybrid con GA4, esegui Plausible anche in modalità \"analytics_storage: denied\". Perché Plausible non usa cookie, non richiede consenso. L'architettura ",{"type":33,"tag":836,"props":837,"children":841},"a",{"href":838,"rel":839},"https:\u002F\u002Fwww.roibase.com.tr\u002Fit\u002Ffirstparty",[840],"nofollow",[842],{"type":38,"value":843},"first-party data",{"type":38,"value":845}," dettaglia questo setup hybrid: Plausible misura il traffico, server-side GTM invia event di conversione a CDP.",{"type":33,"tag":41,"props":847,"children":849},{"id":848},"case-production-stack-hybrid-e-commerce",[850],{"type":38,"value":851},"Case Production: Stack Hybrid E-Commerce",{"type":33,"tag":34,"props":853,"children":854},{},[855],{"type":38,"value":856},"L'architettura che abbiamo implementato per un negozio Shopify:",{"type":33,"tag":34,"props":858,"children":859},{},[860],{"type":33,"tag":66,"props":861,"children":862},{},[863],{"type":38,"value":864},"Frontend:",{"type":33,"tag":58,"props":866,"children":867},{},[868,873],{"type":33,"tag":62,"props":869,"children":870},{},[871],{"type":38,"value":872},"Plausible tracker su tutte le pagine (product view, cart, checkout)",{"type":33,"tag":62,"props":874,"children":875},{},[876,878,884],{"type":38,"value":877},"Event personalizzato ",{"type":33,"tag":84,"props":879,"children":881},{"className":880},[],[882],{"type":38,"value":883},"plausible('Purchase', {revenue: 150})",{"type":38,"value":885}," al checkout success",{"type":33,"tag":34,"props":887,"children":888},{},[889],{"type":33,"tag":66,"props":890,"children":891},{},[892],{"type":38,"value":893},"Backend (Cloudflare Worker):",{"type":33,"tag":153,"props":895,"children":899},{"code":896,"language":897,"meta":16,"className":898,"style":16},"addEventListener('fetch', event => {\n  event.respondWith(handleRequest(event.request))\n})\n\nasync function handleRequest(request) {\n  const url = new URL(request.url)\n  \n  if (url.pathname === '\u002Fapi\u002Fevent') {\n    const body = await request.json()\n    const sessionId = hashSession(request.headers.get('CF-Connecting-IP'), \n                                    request.headers.get('User-Agent'))\n    \n    \u002F\u002F Controllo sessione in Redis\n    const exists = await redis.exists(`session:${sessionId}`)\n    \n    if (!exists) {\n      await redis.setex(`session:${sessionId}`, 1800, '1')\n      await kafka.send({\n        topic: 'pageviews',\n        messages: [{\n          key: sessionId,\n          value: JSON.stringify({\n            page: body.url,\n            referrer: new URL(body.referrer).hostname,\n            timestamp: Date.now()\n          })\n        }]\n      })\n    }\n    \n    return new Response('OK', {status: 202})\n  }\n}\n","javascript","language-javascript shiki shiki-themes github-dark",[900],{"type":33,"tag":84,"props":901,"children":902},{"__ignoreMap":16},[903,940,967,975,982,1014,1047,1055,1082,1119,1164,1190,1199,1208,1263,1271,1295,1351,1374,1392,1401,1410,1438,1447,1470,1488,1497,1506,1515,1524,1532,1573,1582],{"type":33,"tag":176,"props":904,"children":905},{"class":178,"line":179},[906,911,915,920,924,930,935],{"type":33,"tag":176,"props":907,"children":908},{"style":204},[909],{"type":38,"value":910},"addEventListener",{"type":33,"tag":176,"props":912,"children":913},{"style":210},[914],{"type":38,"value":596},{"type":33,"tag":176,"props":916,"children":917},{"style":388},[918],{"type":38,"value":919},"'fetch'",{"type":33,"tag":176,"props":921,"children":922},{"style":210},[923],{"type":38,"value":396},{"type":33,"tag":176,"props":925,"children":927},{"style":926},"--shiki-default:#FFAB70",[928],{"type":38,"value":929},"event",{"type":33,"tag":176,"props":931,"children":932},{"style":193},[933],{"type":38,"value":934}," =>",{"type":33,"tag":176,"props":936,"children":937},{"style":210},[938],{"type":38,"value":939}," {\n",{"type":33,"tag":176,"props":941,"children":942},{"class":178,"line":189},[943,948,953,957,962],{"type":33,"tag":176,"props":944,"children":945},{"style":210},[946],{"type":38,"value":947},"  event.",{"type":33,"tag":176,"props":949,"children":950},{"style":204},[951],{"type":38,"value":952},"respondWith",{"type":33,"tag":176,"props":954,"children":955},{"style":210},[956],{"type":38,"value":596},{"type":33,"tag":176,"props":958,"children":959},{"style":204},[960],{"type":38,"value":961},"handleRequest",{"type":33,"tag":176,"props":963,"children":964},{"style":210},[965],{"type":38,"value":966},"(event.request))\n",{"type":33,"tag":176,"props":968,"children":969},{"class":178,"line":216},[970],{"type":33,"tag":176,"props":971,"children":972},{"style":210},[973],{"type":38,"value":974},"})\n",{"type":33,"tag":176,"props":976,"children":977},{"class":178,"line":240},[978],{"type":33,"tag":176,"props":979,"children":980},{"emptyLinePlaceholder":368},[981],{"type":38,"value":371},{"type":33,"tag":176,"props":983,"children":984},{"class":178,"line":262},[985,990,995,1000,1004,1009],{"type":33,"tag":176,"props":986,"children":987},{"style":193},[988],{"type":38,"value":989},"async",{"type":33,"tag":176,"props":991,"children":992},{"style":193},[993],{"type":38,"value":994}," function",{"type":33,"tag":176,"props":996,"children":997},{"style":204},[998],{"type":38,"value":999}," handleRequest",{"type":33,"tag":176,"props":1001,"children":1002},{"style":210},[1003],{"type":38,"value":596},{"type":33,"tag":176,"props":1005,"children":1006},{"style":926},[1007],{"type":38,"value":1008},"request",{"type":33,"tag":176,"props":1010,"children":1011},{"style":210},[1012],{"type":38,"value":1013},") {\n",{"type":33,"tag":176,"props":1015,"children":1016},{"class":178,"line":279},[1017,1022,1027,1032,1037,1042],{"type":33,"tag":176,"props":1018,"children":1019},{"style":193},[1020],{"type":38,"value":1021},"  const",{"type":33,"tag":176,"props":1023,"children":1024},{"style":298},[1025],{"type":38,"value":1026}," url",{"type":33,"tag":176,"props":1028,"children":1029},{"style":193},[1030],{"type":38,"value":1031}," =",{"type":33,"tag":176,"props":1033,"children":1034},{"style":193},[1035],{"type":38,"value":1036}," new",{"type":33,"tag":176,"props":1038,"children":1039},{"style":204},[1040],{"type":38,"value":1041}," URL",{"type":33,"tag":176,"props":1043,"children":1044},{"style":210},[1045],{"type":38,"value":1046},"(request.url)\n",{"type":33,"tag":176,"props":1048,"children":1049},{"class":178,"line":308},[1050],{"type":33,"tag":176,"props":1051,"children":1052},{"style":210},[1053],{"type":38,"value":1054},"  \n",{"type":33,"tag":176,"props":1056,"children":1057},{"class":178,"line":334},[1058,1063,1068,1073,1078],{"type":33,"tag":176,"props":1059,"children":1060},{"style":193},[1061],{"type":38,"value":1062},"  if",{"type":33,"tag":176,"props":1064,"children":1065},{"style":210},[1066],{"type":38,"value":1067}," (url.pathname ",{"type":33,"tag":176,"props":1069,"children":1070},{"style":193},[1071],{"type":38,"value":1072},"===",{"type":33,"tag":176,"props":1074,"children":1075},{"style":388},[1076],{"type":38,"value":1077}," '\u002Fapi\u002Fevent'",{"type":33,"tag":176,"props":1079,"children":1080},{"style":210},[1081],{"type":38,"value":1013},{"type":33,"tag":176,"props":1083,"children":1084},{"class":178,"line":27},[1085,1090,1095,1099,1104,1109,1114],{"type":33,"tag":176,"props":1086,"children":1087},{"style":193},[1088],{"type":38,"value":1089},"    const",{"type":33,"tag":176,"props":1091,"children":1092},{"style":298},[1093],{"type":38,"value":1094}," body",{"type":33,"tag":176,"props":1096,"children":1097},{"style":193},[1098],{"type":38,"value":1031},{"type":33,"tag":176,"props":1100,"children":1101},{"style":193},[1102],{"type":38,"value":1103}," await",{"type":33,"tag":176,"props":1105,"children":1106},{"style":210},[1107],{"type":38,"value":1108}," request.",{"type":33,"tag":176,"props":1110,"children":1111},{"style":204},[1112],{"type":38,"value":1113},"json",{"type":33,"tag":176,"props":1115,"children":1116},{"style":210},[1117],{"type":38,"value":1118},"()\n",{"type":33,"tag":176,"props":1120,"children":1121},{"class":178,"line":364},[1122,1126,1131,1135,1140,1145,1150,1154,1159],{"type":33,"tag":176,"props":1123,"children":1124},{"style":193},[1125],{"type":38,"value":1089},{"type":33,"tag":176,"props":1127,"children":1128},{"style":298},[1129],{"type":38,"value":1130}," sessionId",{"type":33,"tag":176,"props":1132,"children":1133},{"style":193},[1134],{"type":38,"value":1031},{"type":33,"tag":176,"props":1136,"children":1137},{"style":204},[1138],{"type":38,"value":1139}," hashSession",{"type":33,"tag":176,"props":1141,"children":1142},{"style":210},[1143],{"type":38,"value":1144},"(request.headers.",{"type":33,"tag":176,"props":1146,"children":1147},{"style":204},[1148],{"type":38,"value":1149},"get",{"type":33,"tag":176,"props":1151,"children":1152},{"style":210},[1153],{"type":38,"value":596},{"type":33,"tag":176,"props":1155,"children":1156},{"style":388},[1157],{"type":38,"value":1158},"'CF-Connecting-IP'",{"type":33,"tag":176,"props":1160,"children":1161},{"style":210},[1162],{"type":38,"value":1163},"), \n",{"type":33,"tag":176,"props":1165,"children":1166},{"class":178,"line":374},[1167,1172,1176,1180,1185],{"type":33,"tag":176,"props":1168,"children":1169},{"style":210},[1170],{"type":38,"value":1171},"                                    request.headers.",{"type":33,"tag":176,"props":1173,"children":1174},{"style":204},[1175],{"type":38,"value":1149},{"type":33,"tag":176,"props":1177,"children":1178},{"style":210},[1179],{"type":38,"value":596},{"type":33,"tag":176,"props":1181,"children":1182},{"style":388},[1183],{"type":38,"value":1184},"'User-Agent'",{"type":33,"tag":176,"props":1186,"children":1187},{"style":210},[1188],{"type":38,"value":1189},"))\n",{"type":33,"tag":176,"props":1191,"children":1193},{"class":178,"line":1192},12,[1194],{"type":33,"tag":176,"props":1195,"children":1196},{"style":210},[1197],{"type":38,"value":1198},"    \n",{"type":33,"tag":176,"props":1200,"children":1202},{"class":178,"line":1201},13,[1203],{"type":33,"tag":176,"props":1204,"children":1205},{"style":183},[1206],{"type":38,"value":1207},"    \u002F\u002F Controllo sessione in Redis\n",{"type":33,"tag":176,"props":1209,"children":1211},{"class":178,"line":1210},14,[1212,1216,1221,1225,1229,1234,1239,1243,1248,1253,1258],{"type":33,"tag":176,"props":1213,"children":1214},{"style":193},[1215],{"type":38,"value":1089},{"type":33,"tag":176,"props":1217,"children":1218},{"style":298},[1219],{"type":38,"value":1220}," exists",{"type":33,"tag":176,"props":1222,"children":1223},{"style":193},[1224],{"type":38,"value":1031},{"type":33,"tag":176,"props":1226,"children":1227},{"style":193},[1228],{"type":38,"value":1103},{"type":33,"tag":176,"props":1230,"children":1231},{"style":210},[1232],{"type":38,"value":1233}," redis.",{"type":33,"tag":176,"props":1235,"children":1236},{"style":204},[1237],{"type":38,"value":1238},"exists",{"type":33,"tag":176,"props":1240,"children":1241},{"style":210},[1242],{"type":38,"value":596},{"type":33,"tag":176,"props":1244,"children":1245},{"style":388},[1246],{"type":38,"value":1247},"`session:${",{"type":33,"tag":176,"props":1249,"children":1250},{"style":210},[1251],{"type":38,"value":1252},"sessionId",{"type":33,"tag":176,"props":1254,"children":1255},{"style":388},[1256],{"type":38,"value":1257},"}`",{"type":33,"tag":176,"props":1259,"children":1260},{"style":210},[1261],{"type":38,"value":1262},")\n",{"type":33,"tag":176,"props":1264,"children":1266},{"class":178,"line":1265},15,[1267],{"type":33,"tag":176,"props":1268,"children":1269},{"style":210},[1270],{"type":38,"value":1198},{"type":33,"tag":176,"props":1272,"children":1274},{"class":178,"line":1273},16,[1275,1280,1285,1290],{"type":33,"tag":176,"props":1276,"children":1277},{"style":193},[1278],{"type":38,"value":1279},"    if",{"type":33,"tag":176,"props":1281,"children":1282},{"style":210},[1283],{"type":38,"value":1284}," (",{"type":33,"tag":176,"props":1286,"children":1287},{"style":193},[1288],{"type":38,"value":1289},"!",{"type":33,"tag":176,"props":1291,"children":1292},{"style":210},[1293],{"type":38,"value":1294},"exists) {\n",{"type":33,"tag":176,"props":1296,"children":1298},{"class":178,"line":1297},17,[1299,1304,1308,1313,1317,1321,1325,1329,1333,1338,1342,1347],{"type":33,"tag":176,"props":1300,"children":1301},{"style":193},[1302],{"type":38,"value":1303},"      await",{"type":33,"tag":176,"props":1305,"children":1306},{"style":210},[1307],{"type":38,"value":1233},{"type":33,"tag":176,"props":1309,"children":1310},{"style":204},[1311],{"type":38,"value":1312},"setex",{"type":33,"tag":176,"props":1314,"children":1315},{"style":210},[1316],{"type":38,"value":596},{"type":33,"tag":176,"props":1318,"children":1319},{"style":388},[1320],{"type":38,"value":1247},{"type":33,"tag":176,"props":1322,"children":1323},{"style":210},[1324],{"type":38,"value":1252},{"type":33,"tag":176,"props":1326,"children":1327},{"style":388},[1328],{"type":38,"value":1257},{"type":33,"tag":176,"props":1330,"children":1331},{"style":210},[1332],{"type":38,"value":396},{"type":33,"tag":176,"props":1334,"children":1335},{"style":298},[1336],{"type":38,"value":1337},"1800",{"type":33,"tag":176,"props":1339,"children":1340},{"style":210},[1341],{"type":38,"value":396},{"type":33,"tag":176,"props":1343,"children":1344},{"style":388},[1345],{"type":38,"value":1346},"'1'",{"type":33,"tag":176,"props":1348,"children":1349},{"style":210},[1350],{"type":38,"value":1262},{"type":33,"tag":176,"props":1352,"children":1354},{"class":178,"line":1353},18,[1355,1359,1364,1369],{"type":33,"tag":176,"props":1356,"children":1357},{"style":193},[1358],{"type":38,"value":1303},{"type":33,"tag":176,"props":1360,"children":1361},{"style":210},[1362],{"type":38,"value":1363}," kafka.",{"type":33,"tag":176,"props":1365,"children":1366},{"style":204},[1367],{"type":38,"value":1368},"send",{"type":33,"tag":176,"props":1370,"children":1371},{"style":210},[1372],{"type":38,"value":1373},"({\n",{"type":33,"tag":176,"props":1375,"children":1377},{"class":178,"line":1376},19,[1378,1383,1388],{"type":33,"tag":176,"props":1379,"children":1380},{"style":210},[1381],{"type":38,"value":1382},"        topic: ",{"type":33,"tag":176,"props":1384,"children":1385},{"style":388},[1386],{"type":38,"value":1387},"'pageviews'",{"type":33,"tag":176,"props":1389,"children":1390},{"style":210},[1391],{"type":38,"value":237},{"type":33,"tag":176,"props":1393,"children":1395},{"class":178,"line":1394},20,[1396],{"type":33,"tag":176,"props":1397,"children":1398},{"style":210},[1399],{"type":38,"value":1400},"        messages: [{\n",{"type":33,"tag":176,"props":1402,"children":1404},{"class":178,"line":1403},21,[1405],{"type":33,"tag":176,"props":1406,"children":1407},{"style":210},[1408],{"type":38,"value":1409},"          key: sessionId,\n",{"type":33,"tag":176,"props":1411,"children":1413},{"class":178,"line":1412},22,[1414,1419,1424,1429,1434],{"type":33,"tag":176,"props":1415,"children":1416},{"style":210},[1417],{"type":38,"value":1418},"          value: ",{"type":33,"tag":176,"props":1420,"children":1421},{"style":298},[1422],{"type":38,"value":1423},"JSON",{"type":33,"tag":176,"props":1425,"children":1426},{"style":210},[1427],{"type":38,"value":1428},".",{"type":33,"tag":176,"props":1430,"children":1431},{"style":204},[1432],{"type":38,"value":1433},"stringify",{"type":33,"tag":176,"props":1435,"children":1436},{"style":210},[1437],{"type":38,"value":1373},{"type":33,"tag":176,"props":1439,"children":1441},{"class":178,"line":1440},23,[1442],{"type":33,"tag":176,"props":1443,"children":1444},{"style":210},[1445],{"type":38,"value":1446},"            page: body.url,\n",{"type":33,"tag":176,"props":1448,"children":1450},{"class":178,"line":1449},24,[1451,1456,1461,1465],{"type":33,"tag":176,"props":1452,"children":1453},{"style":210},[1454],{"type":38,"value":1455},"            referrer: ",{"type":33,"tag":176,"props":1457,"children":1458},{"style":193},[1459],{"type":38,"value":1460},"new",{"type":33,"tag":176,"props":1462,"children":1463},{"style":204},[1464],{"type":38,"value":1041},{"type":33,"tag":176,"props":1466,"children":1467},{"style":210},[1468],{"type":38,"value":1469},"(body.referrer).hostname,\n",{"type":33,"tag":176,"props":1471,"children":1473},{"class":178,"line":1472},25,[1474,1479,1484],{"type":33,"tag":176,"props":1475,"children":1476},{"style":210},[1477],{"type":38,"value":1478},"            timestamp: Date.",{"type":33,"tag":176,"props":1480,"children":1481},{"style":204},[1482],{"type":38,"value":1483},"now",{"type":33,"tag":176,"props":1485,"children":1486},{"style":210},[1487],{"type":38,"value":1118},{"type":33,"tag":176,"props":1489,"children":1491},{"class":178,"line":1490},26,[1492],{"type":33,"tag":176,"props":1493,"children":1494},{"style":210},[1495],{"type":38,"value":1496},"          })\n",{"type":33,"tag":176,"props":1498,"children":1500},{"class":178,"line":1499},27,[1501],{"type":33,"tag":176,"props":1502,"children":1503},{"style":210},[1504],{"type":38,"value":1505},"        }]\n",{"type":33,"tag":176,"props":1507,"children":1509},{"class":178,"line":1508},28,[1510],{"type":33,"tag":176,"props":1511,"children":1512},{"style":210},[1513],{"type":38,"value":1514},"      })\n",{"type":33,"tag":176,"props":1516,"children":1518},{"class":178,"line":1517},29,[1519],{"type":33,"tag":176,"props":1520,"children":1521},{"style":210},[1522],{"type":38,"value":1523},"    }\n",{"type":33,"tag":176,"props":1525,"children":1527},{"class":178,"line":1526},30,[1528],{"type":33,"tag":176,"props":1529,"children":1530},{"style":210},[1531],{"type":38,"value":1198},{"type":33,"tag":176,"props":1533,"children":1535},{"class":178,"line":1534},31,[1536,1541,1545,1550,1554,1559,1564,1569],{"type":33,"tag":176,"props":1537,"children":1538},{"style":193},[1539],{"type":38,"value":1540},"    return",{"type":33,"tag":176,"props":1542,"children":1543},{"style":193},[1544],{"type":38,"value":1036},{"type":33,"tag":176,"props":1546,"children":1547},{"style":204},[1548],{"type":38,"value":1549}," Response",{"type":33,"tag":176,"props":1551,"children":1552},{"style":210},[1553],{"type":38,"value":596},{"type":33,"tag":176,"props":1555,"children":1556},{"style":388},[1557],{"type":38,"value":1558},"'OK'",{"type":33,"tag":176,"props":1560,"children":1561},{"style":210},[1562],{"type":38,"value":1563},", {status: ",{"type":33,"tag":176,"props":1565,"children":1566},{"style":298},[1567],{"type":38,"value":1568},"202",{"type":33,"tag":176,"props":1570,"children":1571},{"style":210},[1572],{"type":38,"value":974},{"type":33,"tag":176,"props":1574,"children":1576},{"class":178,"line":1575},32,[1577],{"type":33,"tag":176,"props":1578,"children":1579},{"style":210},[1580],{"type":38,"value":1581},"  }\n",{"type":33,"tag":176,"props":1583,"children":1585},{"class":178,"line":1584},33,[1586],{"type":33,"tag":176,"props":1587,"children":1588},{"style":210},[1589],{"type":38,"value":1590},"}\n",{"type":33,"tag":34,"props":1592,"children":1593},{},[1594],{"type":33,"tag":66,"props":1595,"children":1596},{},[1597],{"type":38,"value":1598},"Data layer:",{"type":33,"tag":58,"props":1600,"children":1601},{},[1602,1607,1612],{"type":33,"tag":62,"props":1603,"children":1604},{},[1605],{"type":38,"value":1606},"Kafka consumer scrive in TimescaleDB (batch insert ogni 10 secondi)",{"type":33,"tag":62,"props":1608,"children":1609},{},[1610],{"type":38,"value":1611},"Dashboard Grafana legge da TimescaleDB (real-time, refresh 2 secondi)",{"type":33,"tag":62,"props":1613,"children":1614},{},[1615],{"type":38,"value":1616},"Export giornaliero in BigQuery (join con dbt: traffico Plausible + dati ordini Shopify)",{"type":33,"tag":34,"props":1618,"children":1619},{},[1620],{"type":38,"value":1621},"Risultato: Attribution di conversione al 92% di accuratezza (in GA4 era 58% — per ITP e cookie rejection). Conformità KVKK 100% — nessun PII memorizzato. Query dashboard 40ms (GA4: 4-6 secondi).",{"type":33,"tag":41,"props":1623,"children":1625},{"id":1624},"plausible-vs-ga4-quando-usare-quale",[1626],{"type":38,"value":1627},"Plausible vs GA4: Quando Usare Quale",{"type":33,"tag":34,"props":1629,"children":1630},{},[1631],{"type":38,"value":1632},"Devo buttare via GA4? No. In due scenari rimane logico:",{"type":33,"tag":34,"props":1634,"children":1635},{},[1636],{"type":33,"tag":66,"props":1637,"children":1638},{},[1639],{"type":38,"value":1640},"Usa GA4:",{"type":33,"tag":58,"props":1642,"children":1643},{},[1644,1649,1654],{"type":33,"tag":62,"props":1645,"children":1646},{},[1647],{"type":38,"value":1648},"Cross-domain tracking (più siti, subdomain — il meccanismo linker di GA4 è più maturo)",{"type":33,"tag":62,"props":1650,"children":1651},{},[1652],{"type":38,"value":1653},"ML insights (GA4 ha metriche predittive: purchase probability, churn probability)",{"type":33,"tag":62,"props":1655,"children":1656},{},[1657],{"type":38,"value":1658},"Integrazione Google Ads (enhanced conversions, push audience remarketing — GA4 integrato nativo)",{"type":33,"tag":34,"props":1660,"children":1661},{},[1662],{"type":33,"tag":66,"props":1663,"children":1664},{},[1665],{"type":38,"value":1666},"Usa Plausible:",{"type":33,"tag":58,"props":1668,"children":1669},{},[1670,1675,1680],{"type":33,"tag":62,"props":1671,"children":1672},{},[1673],{"type":38,"value":1674},"Dashboard pubblico (puoi embeddare Plausible e pubblicarlo — GA4 richiede viewer account)",{"type":33,"tag":62,"props":1676,"children":1677},{},[1678],{"type":38,"value":1679},"Siti leggeri (blog, landing page, marketing site SaaS)",{"type":33,"tag":62,"props":1681,"children":1682},{},[1683],{"type":38,"value":1684},"Compliance rigido (KVKK, GDPR, CCPA — Plausible zero rischio)",{"type":33,"tag":34,"props":1686,"children":1687},{},[1688],{"type":38,"value":1689},"La configurazione hybrid è più comune: Plausible misura il traffico site-wide, GA4 attiva solo nel critical conversion funnel via server-side GTM. Offre sia privacy che performance.",{"type":33,"tag":34,"props":1691,"children":1692},{},[1693],{"type":38,"value":1694},"L'analytics privacy-first non è più \"sarebbe bello\", è \"devo farlo\" obbligatorio. Chrome 2024 ha cancellato i cookie, le sanzioni KVKK 2025 sono cresciute del 300%. L'architettura Plausible + server-side aggregation è l'unica soluzione production-ready che affronta entrambe le pressioni. Se ancora soffri della perdita di dati del 60% di GA4, pianifica il passaggio a misurazione cookieless — perché nel 2026 uno stack di analytics senza cookie non potrà sopravvivere.",{"type":33,"tag":1696,"props":1697,"children":1698},"style",{},[1699],{"type":38,"value":1700},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":16,"searchDepth":216,"depth":216,"links":1702},[1703,1704,1705,1706,1707],{"id":43,"depth":189,"text":46},{"id":138,"depth":189,"text":141},{"id":495,"depth":189,"text":498},{"id":848,"depth":189,"text":851},{"id":1624,"depth":189,"text":1627},"markdown","content:it:data:privacy-first-analytics-plausible-server-side-aggregation.md","content","it\u002Fdata\u002Fprivacy-first-analytics-plausible-server-side-aggregation.md","it\u002Fdata\u002Fprivacy-first-analytics-plausible-server-side-aggregation","md",1779314642154]