@volvo-cars/tracking-types
v2.2.0
Published
TypeScript definitions for tracking events
Downloads
328
Maintainers
Keywords
Readme
@volvo-cars/tracking-types
TypeScript definitions for the tracking events used in the Volvo Cars data
tracking pipeline. These are camelCase types, which are used in the
@volvo-cars/tracking
package but properties are expected to be snake_case before sending them to
the tracking service.
- Installation
- Usage
- Events
- AccountDeleted
- AddAddons
- AddonSelect
- BeginOrder
- CarComparisonChooseModel
- CarComparisonExploreModel
- CarListingAddToCompare
- CarListingClickCard
- CarListingSelectFilter
- CarListingSelectSorting
- ChatOpen
- ConfigurationCopyLink
- ConfigurationDownloadSpec
- ConfigurationFinish
- ConfigurationSave
- ConfigurationSelectColor
- ConfigurationSelectInterior
- ConfigurationSelectLevel
- ConfigurationSelectPowertrain
- ConfigurationSelectWheels
- ConfigurationStart
- ConfigurationViewSummary
- CustomEvent
- DealerSearchSelectFilter
- DealerSearchSelectRetailer
- DealerSearchSubmit
- DownloadInvoice
- FaqInteraction
- FileDownload
- FilterDeselect
- FilterSelect
- FinanceSelectAnnualMileage
- FinanceSelectContractTerm
- FinanceSelectCustomerType
- FinanceSelectDownpayment
- FinanceSelectOption
- FinanceSelectPartsExchange
- FleetSignupCompleted
- FormError
- FormInputStart
- FormLoad
- FormSubmit
- GlobalSearchClickResult
- GlobalSearchSubmit
- GlobalSearchZeroResult
- ImageGalleryInteraction
- LogIn
- LogOut
- MailLinkInteraction
- ModifyOrder
- OfferDrawerExpand
- OrderStarted
- OrderStatusPageView
- OrderSubmitPaymentInfo
- OrderSubmitPersonalDetails
- PageView
- PaginationClicks
- PhoneLinkInteraction
- PromoListingClick
- RecentlyConfiguredCarSelect
- RemoveFavorites
- ServiceBookingProgress
- SitenavInteraction
- SupportSearchClickResult
- SupportSearchSubmit
- SupportSelectCar
- SupportSelectRelatedArticle
- SupportSelectTopicCategory
- TalkToAVolvoSpecialistSelect
- TestDriveBookingCancelled
- TrackMyOrder
- VideoPlay
Installation
yarn add @volvo-cars/tracking-typesUsage
import type { PageView } from "@volvo-cars/tracking-types";
const pageView: PageView = {
event: "page_view",
pageName: "ex90",
pageType: "pdp",
};To omit automatic properties that are usually handled by the tracking package internally, like sessionId and deviceId:
import type { PageView, OmitAutoProperties } from "@volvo-cars/tracking-types";
const pageView: OmitAutoProperties<PageView> = {
event: "page_view",
pageName: "ex90",
pageType: "pdp",
};Events
AccountDeleted
Event triggered when a user deletes their account
Properties
| Property | Type | Description |
| ----------------------------------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| browserName? | string | Browser Name |
| browserVersion? | string | Browser Version |
| countryCode | string | Identifies the market site a user is visiting. Is determined by the URL and formatted following the ISO 3166-1 alpha-2 standard. |
| countryCodeGeo? | string | Country code based on geolocation, complements 'country_code' from URL, ISO 3166-1 alpha-2. |
| cpuArchitecture? | string | CPU Architecture |
| deviceId | string | Device ID |
| deviceManufacturer? | string | Device Manufacturer |
| deviceModel? | string | Device Model |
| deviceType? | string | Device Type |
| engineName? | string | Engine Name |
| engineVersion? | string | Engine Version |
| event | "account_deleted" | Event name |
| eventAction? | string | Used to categorize similar interactions |
| eventCategory? | string | Used to categorize similar interactions |
| eventId | string | Event UUID |
| eventLabel? | string | Used to categorize similar interactions |
| eventTimestamp | string | Event ISO 8601 timestamp |
| eventTriggerTimestamp? | string | Event ISO 8601 timestamp |
| marketLanguage | string | Identifies the language of the market site a user is visiting. Is determined by the URL and formatted following the ISO 639-1 standard. |
| osName? | string | Operating System Name |
| osVersion? | string | Operating System Version |
| pageName | string | page name |
| pageType | string | page type |
| previousPageName? | string | Used to track the previous page name the user was on |
| sessionId | number | Session ID |
| subPageName? | string | Used to categorize similar pages/content |
| url? | string | page URL |
| userAgent? | string | User Agent |
| userId? | string | User ID |
AddAddons
Triggered when a user adds an accessory or addon, excluding cars, to the shopping cart.
Properties
| Property | Type | Description |
| ----------------------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| addons? | object[] | List of addons or accessories added |
| browserName? | string | Browser Name |
| browserVersion? | string | Browser Version |
| carBuildType? | string | This dimension is used to segment the ecom funnel based on build type: stock or bto. |
| carColor? | string | Color of the car |
| carEngine? | string | Engine of the car |
| carModel? | string | Model of the car |
| carModelId? | string | ID of the car model |
| carModelYear? | string | Year of the car model |
| carToken? | string | ID that maps to a backend table containing information about the car such a PNO34, Description, Images etc. |
| carTotalPrice? | number | Total price of the car |
| carUpholstery? | string | Interior textile of the car |
| carVersion? | string | Car equipment level |
| countryCode | string | Identifies the market site a user is visiting. Is determined by the URL and formatted following the ISO 3166-1 alpha-2 standard. |
| countryCodeGeo? | string | Country code based on geolocation, complements 'country_code' from URL, ISO 3166-1 alpha-2. |
| cpuArchitecture? | string | CPU Architecture |
| currency? | string | Currency code with 3-character ISO 4217 code |
| deviceId | string | Device ID |
| deviceManufacturer? | string | Device Manufacturer |
| deviceModel? | string | Device Model |
| deviceType? | string | Device Type |
| engineName? | string | Engine Name |
| engineVersion? | string | Engine Version |
| event | "add_addons" | Event name |
| eventId | string | Event UUID |
| eventTimestamp | string | Event ISO 8601 timestamp |
| eventTriggerTimestamp? | string | Event ISO 8601 timestamp |
| marketLanguage | string | Identifies the language of the market site a user is visiting. Is determined by the URL and formatted following the ISO 639-1 standard. |
| osName? | string | Operating System Name |
| osVersion? | string | Operating System Version |
| pageName | string | page name |
| pageType | string | page type |
| pno34? | string | Unique ID for a car configuration |
| powertrain? | string | Used to categorise PDPs, configurations, lead/order submissions based on drive line. |
| previousPageName? | string | Used to track the previous page name the user was on |
| price? | number | Price of the car or price of addons/accessories |
| productClass? | string | Identifies the car category type |
| quantity? | number | Quantity of cars or addons, default is 1 |
| sessionId | number | Session ID |
| signedIn? | boolean | Identifies the user login status |
| subPageName? | string | Used to categorize similar pages/content |
| totalRange? | string | Used in electric car range calculator in km |
| url? | string | page URL |
| userAgent? | string | User Agent |
| userId? | string | User ID |
AddonSelect
When a user clicks on the add button on the configurator or additionals page
Properties
| Property | Type | Description |
| ----------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| addonProductCategory? | string | add on product category |
| addonProductId? | string | add on product id |
| addonProductName? | string | add on product name |
| browserName? | string | Browser Name |
| browserVersion? | string | Browser Version |
| carBuildType? | string | This dimension is used to segment the ecom funnel based on build type: stock or bto. |
| carColor? | string | Color of the car |
| carEngine? | string | Engine of the car |
| carModel? | string | Model of the car |
| carModelId? | string | ID of the car model |
| carModelYear? | string | Year of the car model |
| carToken? | string | ID that maps to a backend table containing information about the car such a PNO34, Description, Images etc. |
| carTotalPrice? | number | Total price of the car |
| carUpholstery? | string | Interior textile of the car |
| carVersion? | string | Car equipment level |
| countryCode | string | Identifies the market site a user is visiting. Is determined by the URL and formatted following the ISO 3166-1 alpha-2 standard. |
| countryCodeGeo? | string | Country code based on geolocation, complements 'country_code' from URL, ISO 3166-1 alpha-2. |
| cpuArchitecture? | string | CPU Architecture |
| deviceId | string | Device ID |
| deviceManufacturer? | string | Device Manufacturer |
| deviceModel? | string | Device Model |
| deviceType? | string | Device Type |
| engineName? | string | The rendering engine that processes and displays web content in a browser (e.g., Blink, WebKit, Gecko). |
| engineVersion? | string | The specific version of the rendering engine, indicating its updates and capabilities (e.g., 537.36 for WebKit) |
| event | "addon_select" | Event name |
| eventId | string | Event UUID |
| eventTimestamp | string | Event ISO 8601 timestamp |
| eventTriggerTimestamp? | string | Event ISO 8601 timestamp |
| featureFlag? | string | Used for analyzing results of AB tests, should be equal to LanchDarkly feature flags comma separated. e.g: 'flag1=value1,flag2=value2' |
| featureIdAndPrice? | string | Setup on review page, lists the packages, options, and accessories added in configurator with pipe delimiter |
| marketLanguage | string | Identifies the language of the market site a user is visiting. Is determined by the URL and formatted following the ISO 639-1 standard. |
| osName? | string | Operating System Name |
| osVersion? | string | Operating System Version |
| pageName | string | Used to categorize similar pages/content |
| pageType | string | Used to categorize similar pages/content |
| pno34? | string | Unique ID for a car configuration |
| powertrain? | string | Used to categorise PDPs, configurations, lead/order submissions based on drive line. |
| previousPageName? | string | Used to track the previous page name the user was on |
| productClass? | string | Identifies the car category type |
| sessionId | number | Session ID |
| signedIn? | boolean | Identifies the user login status |
| subPageName? | string | Used to categorize similar pages/content |
| totalRange? | string | Used in electric car range calculator in km |
| url? | string | page URL |
| userAgent? | string | Captures information about the browser and device |
| userId? | string | User ID |
BeginOrder
Triggered when a user initiates the order process, marking the start of the purchase funnel.
Properties
| Property | Type | Description |
| ----------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| addons? | object[] | List of addons or accessories added |
| browserName? | string | Browser Name |
| browserVersion? | string | Browser Version |
| carBuildType? | string | This dimension is used to segment the ecom funnel based on build type: stock or bto. |
| carColor? | string | Color of the car |
| carEngine? | string | Engine of the car |
| carModel? | string | Model of the car |
| carModelId? | string | ID of the car model |
| carModelYear? | string | Year of the car model |
| carToken? | string | ID that maps to a backend table containing information about the car such a PNO34, Description, Images etc. |
| carTotalPrice? | number | Total price of the car |
| carUpholstery? | string | Interior textile of the car |
| carVersion? | string | Car equipment level |
| countryCode | string | Identifies the market site a user is visiting. Is determined by the URL and formatted following the ISO 3166-1 alpha-2 standard. |
| countryCodeGeo? | string | Country code based on geolocation, complements 'country_code' from URL, ISO 3166-1 alpha-2. |
| cpuArchitecture? | string | CPU Architecture |
| currency? | string | Currency code with 3-character ISO 4217 code |
| deviceId | string | Device ID |
| deviceManufacturer? | string | Device Manufacturer |
| deviceModel? | string | Device Model |
| deviceType? | string | Device Type |
| downpayment? | number | Sent when a user converts (submits a lead or order). |
| durationMileage? | string | Used in car finance calculator |
| engineName? | string | Engine Name |
| engineVersion? | string | Engine Version |
| event | "begin_order" | Event name |
| eventId | string | Event UUID |
| eventTimestamp | string | Event ISO 8601 timestamp |
| eventTriggerTimestamp? | string | Event ISO 8601 timestamp |
| loanDetails? | string | Contains details of the loan the user is interested in. Sent when a user converts (submits a lead or order). |
| marketLanguage | string | Identifies the language of the market site a user is visiting. Is determined by the URL and formatted following the ISO 639-1 standard. |
| offerType? | string | Identifies the sale type (e.g., subscription, lease, loan, cash) and package type (basic or upsell) offered to the user at the point of conversion, reflecting the financial model behind the selected sale option. |
| osName? | string | Operating System Name |
| osVersion? | string | Operating System Version |
| pageName | string | page name |
| pageType | string | page type |
| pno34? | string | Unique ID for a car configuration |
| powertrain? | string | Used to categorise PDPs, configurations, lead/order submissions based on drive line. |
| previousPageName? | string | Used to track the previous page name the user was on |
| price? | number | Price of the car or price of addons/accessories |
| productClass? | string | Identifies the car category type |
| quantity? | number | Quantity of cars or addons, default is 1 |
| saleType? | string | Identifies the selected finance option. Sent when a user converts (submits a lead or order). |
| sessionId | number | Session ID |
| signedIn? | boolean | Identifies the user login status |
| subPageName? | string | Used to categorize similar pages/content |
| totalMonthlyPrice? | number | If a user selects a finance option with monthly price we should capture this along with the financial selections. If cash is selected this is set to 0. Specify some ranges to avoid getting to many unique values. Sent when a user converts (submits a lead or order). |
| totalRange? | string | Used in electric car range calculator in km |
| url? | string | page URL |
| userAgent? | string | User Agent |
| userId? | string | User ID |
CarComparisonChooseModel
When a user selects a car model on the car comparison page
Properties
| Property | Type | Description |
| ----------------------------------------------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| browserName? | string | Browser Name |
| browserVersion? | string | Browser Version |
| carBuildType? | string | This dimension is used to segment the ecom funnel based on build type: stock or bto. |
| carModel? | string | Model of the car |
| carModelId? | string | ID of the car model |
| countryCode? | string | Identifies the market site a user is visiting. Is determined by the URL and formatted following the ISO 3166-1 alpha-2 standard. |
| countryCodeGeo? | string | Country code based on geolocation, complements 'country_code' from URL, ISO 3166-1 alpha-2. |
| cpuArchitecture? | string | CPU Architecture |
| deviceId | string | Device ID |
| deviceManufacturer? | string | Device Manufacturer |
| deviceModel? | string | Device Model |
| deviceType? | string | Device Type |
| engineName? | string | The rendering engine that processes and displays web content in a browser (e.g., Blink, WebKit, Gecko). |
| engineVersion? | string | The specific version of the rendering engine, indicating its updates and capabilities (e.g., 537.36 for WebKit) |
| event | "car_comparison_choose_model" | Event name |
| eventId | string | Event UUID |
| eventTimestamp | string | Event ISO 8601 timestamp |
| eventTriggerTimestamp? | string | Event ISO 8601 timestamp |
| featureFlag? | string | Used for analyzing results of AB tests, should be equal to LaunchDarkly feature flags comma separated. e.g: 'flag1=value1,flag2=value2' |
| marketLanguage? | string | Identifies the language of the market site a user is visiting. Is determined by the URL and formatted following the ISO 639-1 standard. |
| osName? | string | Operating System Name |
| osVersion? | string | Operating System Version |
| pageName | string | Used to categorize similar pages/content |
| pageType | string | Used to categorize similar pages/content |
| powertrain? | string | Used to categorise PDPs, configurations, lead/order submissions based on drive line. |
| previousPageName? | string | Used to track the previous page name the user was on |
| productClass? | string | Identifies the car category type |
| sessionId | number | Session ID |
| signedIn? | boolean | Identifies the user login status |
| subPageName? | string | Used to categorize similar pages/content |
| url? | string | page URL |
| userAgent? | string | Captures information about the browser and device |
| userId? | string | User ID |
CarComparisonExploreModel
When a user clicks on Explore on the car comparison page
Properties
| Property | Type | Description |
| ----------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| browserName? | string | Browser Name |
| browserVersion? | string | Browser Version |
| carBuildType? | string | This dimension is used to segment the ecom funnel based on build type: stock or bto. |
| carModel? | string | Model of the car |
| carModelId? | string | ID of the car model |
| countryCode? | string | Identifies the market site a user is visiting. Is determined by the URL and formatted following the ISO 3166-1 alpha-2 standard. |
| countryCodeGeo? | string | Country code based on geolocation, complements 'country_code' from URL, ISO 3166-1 alpha-2. |
| cpuArchitecture? | string | CPU Architecture |
| deviceId | string | Device ID |
| deviceManufacturer? | string | Device Manufacturer |
| deviceModel? | string | Device Model |
| deviceType? | string | Device Type
