Proje: Okul Platform · Hub: Okul Platform — Architecture

Profiling GA event taxonomy

Profiling modülü (Eğitim Yaklaşımı Testi + Okul Bulma Formu + Sonuç sayfası) için tanımlanan event ağacı. Tüm helper’lar konvansiyon uyarınca resources/assets/scripts/gaEvents.js’te yaşar; profiling bundle yalnızca CALL eder (resources/assets/scripts/profiling/events.js).

Page types

pageTypeAnlamı
ProfilingTest11 soruluk Eğitim Yaklaşımı Testi wizard’ı
ProfilingResultTest sonuç sayfası (inline okul kartları + çoklu lead)
ProfilingFinderOkul Bulma Formu wizard’ı
ProfilingFinderResultOkul Bulma özet sayfası (mevcut listeleme’ye yönlendirme)

Helper fonksiyonlar (gaEvents.js)

gaSendEventProfiling(pageType, action, age, primaryModels, supportingModels)
    // action: Complete | ResultView | Reset | SchoolsFetched
 
gaSendEventProfilingFinder(pageType, action, schoolType, listingUrl)
    // action: Complete | ResultView | GoToListing
 
gaSendEventProfilingLead(pageType, action, schoolCount, schoolIds, schoolNames)
    // action: SchoolSelect | SchoolUnselect | FormOpen | FormClose
    //       | Submit | Success | Error

Var olan generic helper’lar da çağrılır:

  • gaSendEventFormOpen / gaSendEventFormClose — wizard başlangıç/bitiş
  • gaSendEventSteps — adım geçişleri (ProfilingStep / FinderStep)
  • gaSendEventSchools — okul kartı tıklaması (SchoolCard + ModelCta)
  • gaSendEventNavigation — “Tüm Okullar”, “Eğitim Danışmanı” gibi CTA’lar

Event noktaları (call sites)

Test wizard

AksiyonFonksiyon
Sayfa açılırgaSendEventFormOpen('ProfilingTest','open','ProfilingForm','Wizard','Start',...)
Adım değişirgaSendEventSteps('Next','ProfilingStep', q.id)
Test tamamlanırgaSendEventFormClose + gaSendEventProfiling('ProfilingTest','Complete', age, primary, supporting)

Sonuç sayfası (inline okullar + çoklu lead)

AksiyonFonksiyon
Sonuç görüntülenirgaSendEventProfiling('ProfilingResult','ResultView', age, primary, supporting)
Okul listesi çekildigaSendEventProfiling('ProfilingResult','SchoolsFetched', null, null, count)
Okul kartı “Profili gör”gaSendEventSchools('ProfilingResult','Click','SchoolCard', id, name, city, null)
Okul seçildi/çıkarıldıgaSendEventProfilingLead('ProfilingResult','SchoolSelect|SchoolUnselect', count, id, name)
Lead formu açıldıgaSendEventProfilingLead('ProfilingResult','FormOpen', count, ids, names)
Lead formu kapatıldıgaSendEventProfilingLead('ProfilingResult','FormClose', count, null, null)
Lead submit edildigaSendEventProfilingLead('ProfilingResult','Submit', count, ids, null)
Lead başarılıgaSendEventProfilingLead('ProfilingResult','Success', createdCount, createdIds, names)
Lead hatalıgaSendEventProfilingLead('ProfilingResult','Error', null, null, reason)
”Tüm X Okullar”gaSendEventNavigation('ProfilingResult','Click','Button','BrowseAll','…')
”Eğitim Danışmanı”gaSendEventNavigation('ProfilingResult','Click','Button','Consultant','…')
”Testi Tekrar Çöz”gaSendEventProfiling('ProfilingResult','Reset', null, null, null)

Finder wizard

AksiyonFonksiyon
Sayfa açılırgaSendEventFormOpen('ProfilingFinder','open','FinderForm','Wizard','Start',...)
Adım değişirgaSendEventSteps('Next','FinderStep', q.id)
Form tamamlanırgaSendEventFormClose + gaSendEventProfilingFinder('ProfilingFinder','Complete', schoolType, listingUrl)
Sonuç görüntülenirgaSendEventProfilingFinder('ProfilingFinderResult','ResultView', schoolType, null)
”Okulları Göster”gaSendEventProfilingFinder('ProfilingFinderResult','GoToListing', null, url)

Reason alan değerleri (lead Error)

leadError(reason) çağrılarında kullanılan sabit değerler:

  • client-validation — client-side validateClient() başarısız
  • validation — BE 422 validation
  • server — diğer non-2xx HTTP
  • network — fetch error / timeout

Doğrulama

Dev console’da:

dataLayer.filter(e => e.customEventName?.includes('gaEventProfiling'))

Beklenen akış (test → sonuç → lead):

  1. gaEventFormOpen (ProfilingTest open)
  2. gaEventSteps x N (adım geçişleri)
  3. gaEventFormClose (ProfilingTest complete) + gaEventProfiling (Complete)
  4. gaEventProfiling (ResultView) + gaEventProfiling (SchoolsFetched)
  5. gaEventSchools (SchoolCard click) veya gaEventProfilingLead (SchoolSelect)
  6. gaEventProfilingLead (FormOpen → Submit → Success)