Guides

Analytics event inventory and canonical schema

Use this page to implement one event set for the whole funnel. It inventories every event, pageview and client tracking call named in this pack, maps each one to a funnel stage, lists missing events, inconsistent names and absent properties, and states one canonical schema ready to implement. This page adds no new tracking, no new field on a server record, and no new collection.

How this inventory was built

Counts come only from guides in this pack. No server code, no Worker config and no wrangler file is in this pack, so no event is claimed from code that is not in the pack. A name stated as reserved, derived, or not available is kept in that state in the tables below.

  • Client events are the site.js events named in weekly quality rate and in the visitor funnel guide, plus the marketing queue in state ownership.
  • Derived raw events are the report-time names in metric dictionary, built from session, question and answer records already kept, not from a client beacon.
  • Test and staff preview sessions are labeled as test and excluded from every rate, and unavailable checks stay separate from not answered.
  • When recording is off, no capture, storage or forwarding occurs. Opt-out is CAMPUS_ANALYTICS_OPT_OUT, Do Not Track, or Global Privacy Control.

Funnel map

Read left to right. Public stages use Monday UTC. First active workspace uses Monday college local time. The two bases are never mixed in one rate.

```mermaid
flowchart TD
  A[Anonymous page view F0] --> B[CTA click F1]
  B --> C[Demo request start F2]
  B --> D[Sign-in start F3]
  D --> E[Workspace created F4]
  E --> F[First active workspace F5, question in 28 days]
  F --> G[Answer shown cited]
  G --> H[Rating saved]
```

Complete event inventory

Each row states the event as named in the pack, its funnel stage, where it is defined, properties present, and properties absent by design or by gap.

Event, funnel stage, source in this pack, properties present, properties absent
EventFunnel stageSource in this packProperties presentProperties absent
campus_page_viewF0 anonymous page viewVisitor funnel F0, weekly quality campaign auditClean path, utm allowlist fields, referrer class same_site external or none, source pageWorkspace, assistant, channel, event id, consent flag, viewport, question text, search words. Workspace fields are null on public pages by design.
campus_cta_clickF1 CTA click to request demo or sign inVisitor funnel F1, campaign auditDestination path, utm allowlist, referrer class, source pageWorkspace, assistant, channel, event id. A value already in the link is never overwritten.
campus_demo_request_startF2 demo request startVisitor funnel F2, campaign audit, request validationUtm allowlist, referrer class, source page, and on the accepted record kind, page and attribution object validated against the same allowlistForm field values in the attribution object, question text, email, phone, account id, token. One retry reuses the same request id and adds no second start.
campus_sign_in_startF3 sign-in start, signup entryVisitor funnel F3, campaign auditUtm allowlist held in memory for the session, no college name and no workspace idCollege name, workspace id, sign-in completed state. Completed sign-in is a session record, not this event.
campus_workspace_createdF4 workspace createdVisitor funnel F4, campaign audit, stated as reserved in weekly quality auditUtm allowlist fields, workspace record tenant_id and created timestamp used to join to F5College name and question text in the event by design. No workspace id in the event by design.
campus_feedback_givenViewed answer, rating savedWeekly quality event spec, corrected contract tableRating helpful or not_helpful, surface, workspace, assistant, channel, week_starting_monday_utc, id in the corrected demoComment text, answer id, user id, question text. Changing a rating replaces the earlier rating and adds no second count.
campus_answer_shownAsked question to viewed answerWeekly quality event spec, corrected contract tableOutcome not_answered only for this rate, surface, workspace, assistant, channel, week_starting_monday_utc, id in the corrected demoHanded off and unavailable in this event by design, question text, answer text, user id. Handed off stays in the handoff rate and unavailable stays separate.
campus_guide_search_performedSearch before answerWeekly quality event spec, corrected contract tableSurface guides terminology or workspace, result_bucket no_result or with_result, workspace, assistant, channel, week_starting_monday_utc, id in the corrected demoSearch words, result count beyond the bucket, public server record. Public search server record is stated as not available in this pack.
campus-quality custom eventDemo only, weekly quality tool on its pageWeekly quality instrument sectionSame payload as the three quality events above, dispatched on the page for a future collector, kept on device only capped at 100Production collector, signed-in workspace fields are null on the demo. Do not emit this name in the signed-in app.
Install start and install completedAnonymous, mentioned in audit onlyWeekly quality audit sentence only, no names or schema stated in this packName of the allowed class onlyExact event names, fields, and funnel stage. Do not emit until names and fields are stated in the same release.
Derived raw events, not client beaconsSigned-in workspace to asked to viewed, derived at report timeMetric dictionary raw event catalogue, owner dashboard metricssign_in_completed from session, question_submitted, answer_shown_cited, rating_saved, question_handed_off, search_performed server record where present, each with tenant_id, is_test, created_at and the fields named in that catalogueClient beacon for these names, visitor identity, fingerprint, address, marketing identifier. Do not add a beacon for a derived event.

Inconsistent names found in this pack

Keep the canonical name in the right column only. The left column is never emitted after this guide ships.

Inconsistent name, where it appears, canonical name to use
Inconsistent nameWhere it appearsCanonical name
campus_answer_feedback, campus_answer_unanswered, campus_search_no_resultRetired names listed in weekly quality event speccampus_feedback_given, campus_answer_shown, campus_guide_search_performed. Retired names must not be emitted.
value for all three quality eventsWeekly quality mismatch list for the demo before correctionrating for feedback, outcome for answer shown, result_bucket for search performed.
week, ts, surface weekly-quality-rate-guideWeekly quality mismatch list for the demo before correctionweek_starting_monday_utc, no ts field, surface guides on the demo and guides terminology or workspace in the signed-in app.
week, nothelpful, noresult, withresult in getWeeklyWeekly quality mismatch list for the aggregate APIweek_starting_monday_utc, helpful, not_helpful, unanswered, no_result_searches, with_result_searches.
Derived names without campus prefix, such as question_submittedMetric dictionary raw event catalogueKeep derived names for report-time derivation only. Client events keep the campus prefix. Do not rename a derived event into a beacon or a beacon into a derived event.
page and pageSize, sort week with order asc or descWeekly table legacy mapping in pagination and filtering, weekly quality demo tablelimit, offset, sort week_asc or week_desc on the weekly table, and limit default 50 maximum 200 on signed-in lists. Echo limit and offset, never page and pageSize.
Marketing queue persisted in localStorage on the weekly demo versus in-memory queue in site.jsState ownership marketing queue row, weekly quality instrument sectionProduction marketing queue is in-memory only capped at 100 with no network, cookie or storage. Weekly demo persistence under campus-answers weekly-quality v1 is demo only and is not the production queue.

Missing events and absent properties

Each row states a gap, not a new fact. A missing event is not invented in this guide.

Missing event or absent property, funnel stage, and rule until it ships
GapFunnel stageRule until it ships
No client event for question submitted on the public widgetAsked question on a public routeDerive from the question record only after a record is created. Do not use a pageview or a CTA click as a question numerator.
No client event for handoff started or handoff reply viewedAsked to viewed, handoff pathUse question_handed_off derived from the question record and thread record. No per-event send is added.
No distinct answer viewed event, only answer shownViewed answerUse campus_answer_shown once per shown answer. Do not add a view duration event or a second count for a reopen.
No client event for workspace activated, F5 is derivedSigned-in workspace to first active workspaceDerive F5 from tenant_id and question created_at in 28 days. Do not emit a beacon for activation.
No client event for source link clickViewed answer to source checkDo not add a source click event in this release. The source check stays a manual step in Ask and check sources.
No event for rating change, only rating savedViewed answerChanging a rating replaces the earlier rating for the same answer and adds no second count, as the event spec states.
Campaign fields absent from the three quality eventsAll stagesQuality events carry no utm fields. Funnel events carry the utm allowlist only. Do not join quality to campaign by a new field in this release.
Week basis absent from every payloadAll stagesPublic stages state Monday UTC on screen. Signed-in stages state Monday college local time on screen. The payload carries week_starting_monday_utc only, and the signed-in app converts before counting.
Consent and opt-out flag absent from every payloadAll stagesOpt-out suppresses recording before any event is built. No consent flag is recorded and no outcome is recorded when opt-out is on.

Canonical schema ready to implement

Implement exactly these fields. No extra field is added and no listed field is omitted. An unknown event name fails closed and records nothing.

Common envelope for every client event
FieldType and rule
eventString, one of campus_page_view, campus_cta_click, campus_demo_request_start, campus_sign_in_start, campus_workspace_created, campus_feedback_given, campus_answer_shown, campus_guide_search_performed. No other name is emitted.
idString, generated once per event, passed back unchanged, used only to ignore a retry of the same dispatch.
surfaceString, guides, terminology or workspace for quality events, and the page surface for funnel events. Null only where the pack states null on the public demo.
workspace, assistant, channelString or null. Null on public pages with no signed-in workspace. Filled from the record at report time in the signed-in app, never omitted and never typed by the client.
week_starting_monday_utcString, YYYY-MM-DD, a Monday in UTC at 00:00. The signed-in app converts to college local time before counting and states the basis on screen.
Per-event fields beyond the common envelope
EventExtra fields only
campus_page_view, campus_cta_click, campus_demo_request_start, campus_sign_in_start, campus_workspace_createdClean path or destination path, utm_source, utm_medium, utm_campaign, utm_term, utm_content, utm_id each trimmed to 120 characters with letters digits dot underscore or hyphen only, referrer class same_site external or none, source page clean path. No other query parameter is read.
campus_feedback_givenrating, helpful or not_helpful only. No comment text.
campus_answer_shownoutcome, not_answered only for the weekly quality rate. No question text.
campus_guide_search_performedresult_bucket, no_result or with_result only. No search words and no result count beyond the bucket.
  • Never in any event: question text, answer text, comment text, search words, source title, source link, passage, office contact detail, person name, email, phone, account id, student record detail, file content, file name, token, tenant_id, user_id, or full referrer address.
  • Validate every event name and every enum value before recording. A retired name, a missing field, or an extra field fails closed and records nothing.
  • Cap the in-memory marketing queue at 100 in site.js. The weekly demo cap of 100 on device is a demo cap only.
  • Store first-touch campaign values only in session storage under campus-answers campaign v1, only when recording is not off. Values in a later page address win over stored values.
  • Forward campaign values only to same-origin links to request demo and sign in. External links are never changed. A value already in the link is never overwritten.

Implementation in order

Ship in this order through the normal build, with no manual step. Each step keeps every existing test passing before the next step starts.

  1. Step 1: Lock the allowlist

    Set the eight client event names above as the only emitted names in site.js and in the weekly quality demo. Remove every retired name and every legacy aggregate name from emitted payloads.

  2. Step 2: Emit the common envelope

    Add event, id, surface, workspace, assistant, channel and week_starting_monday_utc to every client event, with workspace, assistant and channel as null on public pages.

  3. Step 3: Add per-event fields only

    Add rating, outcome or result_bucket only on the three quality events, and the utm allowlist with referrer class and source page only on the five funnel events.

  4. Step 4: Suppress before recording

    Check CAMPUS_ANALYTICS_OPT_OUT, Do Not Track and Global Privacy Control before building any event. When any is in a true form, record nothing, store nothing and forward nothing.

  5. Step 5: Derive the rest at report time

    Derive sign_in_completed, question_submitted, answer_shown_cited, rating_saved, question_handed_off and workspace activation from session, question, answer and workspace records already kept. Add no beacon for a derived event.

  6. Step 6: Add tests for the schema

    Test each event name, each enum value, each absent field, opt-out suppression, test session exclusion, and one retry with the same id ignored as a duplicate.

Checks before you ship a schema change

Run each check in a test college workspace with test recipients. If a check fails, fix it before a live send.

  • Emit each of the eight client events once and confirm the payload holds only the common envelope plus the per-event fields for that event, with no extra field and no missing field
  • Emit a retired name, a legacy aggregate name, and an unknown event and confirm each records nothing and the weekly table is unchanged
  • Turn on each opt-out signal in turn and confirm no event is recorded, no campaign value is stored, and no link is forwarded
  • Submit a demo request twice with the same request id and confirm one start is counted, and change a rating and confirm one count for the same answer
  • Run the same query in two colleges and confirm no record from the other college appears in any count and system view shows counts by workspace only
  • Confirm a week with a zero denominator shows no measured outcomes in this range, not zero percent, with counts beside the rate

Follow Weekly quality rate for the three quality events, Visitor funnel for F0 to F5, Metric dictionary for derived events and the nine core KPIs, and Read reports for counts by college and assistant.

Next guide

Use one definition for every number, then open the list behind it.