# Data Schema Reference This document provides a detailed reference for the data schema used by the ConversionFlow library. The data is sourced from two main files: `backend_all_leads.csv` and `ga4_selected_events_leads.csv`. ## `backend_all_leads.csv` This file contains data from the lead database. | Column | Type | Description | | --------------------------- | --------- | ------------------------------------------------------------------------------------------------------- | | `USER_PSEUDO_ID` | `string` | Unique user identifier, used to link to GA4 data. | | `SID` | `string` | Internal session ID of the backend. | | `BRAND` | `string` | The brand of the car. | | `MODELNAME` | `string` | The model name of the car. | | `MODELCODE` | `string` | Internal abbreviation for the model name. | | `SALES_FUNNEL` | `string` | Lead status selected by the retailer (`In Progress`, `Lost`, `ClosedSuccessfully`). | | `MAINLEADTYPE` | `string` | The type of lead (e.g., `OfferRequest`, `Testdrive`). | | `LEADCATEGORY` | `string` | The category of the lead (e.g., `Newcar`, `Usedcar`). | | `LEAD_JOURNEY_START` | `datetime`| The timestamp when the user accessed the website with the forms. | | `LEAD_TRANSFERRED` | `datetime`| The timestamp when the lead was transferred to the retailer system. | | `GA4_EVENT_TIMESTAMP` | `datetime`| The timestamp of the GA4 session in which the user submitted a form. | | `GA4_HOSTNAME` | `string` | The hostname of the GA4 session. | | `GA4_DEVICE_CATEGORY` | `string` | The device category of the GA4 session. | | `GA4_SOURCE` | `string` | The session source of the GA4 session. | | `GA4_MEDIUM` | `string` | The session medium of the GA4 session. | | `GA4_SESSION_CHANNEL_GROUP` | `string` | The session default channel group of the GA4 session. | ## `ga4_selected_events_leads.csv` This file contains Google Analytics 4 (GA4) data for users who submitted a lead form. | Column | Type | Description | | --------------------- | --------- | ------------------------------------------------------------------------------------------------------- | | `EVENT_TIMESTAMP` | `datetime`| The timestamp of the event. | | `USER_PSEUDO_ID` | `string` | Unique user identifier, used to link to the lead data. | | `SESSION_ID` | `string` | A unique session identifier, composed of `USER_PSEUDO_ID` and `GA_SESSION_ID`. | | `GA_SESSION_ID` | `string` | The original GA4 session ID. | | `EVENT_NAME` | `string` | The name of the GA4 event (e.g., `session_start`, `car_configuration`). | | `PAGE_LOCATION` | `string` | The URL of the page where the event occurred. | | `MODEL_NAME` | `string` | The model name of the car associated with the event. | | `MODEL_ID` | `string` | Internal abbreviation for the model name. | | `FORM_NAME` | `string` | The name of the form associated with the event. | | `FORM_STEP` | `string` | The step in the form associated with the event. | | `FORM_CONVERSION` | `int` | A binary flag (0 or 1) indicating if the form was converted. | | `FLOW_NAME` | `string` | The name of the flow associated with the event. | | `FLOW_STEP` | `string` | The step in the flow associated with the event. | | `FLOW_CONVERSION` | `int` | A binary flag (0 or 1) indicating if the flow was converted. | | `CAMPAIGN_NAME` | `string` | The name of the marketing campaign. | | `MEDIUM` | `string` | The marketing medium. | | `SOURCE` | `string` | The marketing source. | | `HOSTNAME` | `string` | The hostname where the event occurred. | | `DEVICE_CATEGORY` | `string` | The category of the device used. | | `SESSION_CHANNEL_GROUP` | `string` | The default channel group for the session. |