@volvo-cars/tracking-types
v6.1.0
Published
TypeScript definitions for tracking events
Downloads
870
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
- AiSearchSubmit
- CarComparisonChooseModel
- CarComparisonExploreModel
- CarListingAddToCompare
- CarListingClickCard
- CarListingSelectFilter
- CarListingSelectSorting
- ConfigurationCopyLink
- ConfigurationDownloadSpec
- ConfigurationFinish
- ConfigurationSave
- ConfigurationSelectColor
- ConfigurationSelectInterior
- ConfigurationSelectLevel
- ConfigurationSelectPowertrain
- ConfigurationSelectWheels
- ConfigurationStart
- ConfigurationViewSummary
- CustomEvent
- DealerSearchSelectFilter
- DealerSearchSelectRetailer
- DealerSearchSubmit
- DownloadInvoice
- Exposure
- 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
- SitenavInteraction
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 |
AiSearchSubmit
Triggered when a user searches on a car listings page and the AI automatically applies filters based on the search text.
Properties
| Property | Type | Description |
| ------------------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| aiSearchErrorReason? | string[] | If the AI search failed, this field can capture the error message or reason for failure |
| aiSearchKeywordCategories? | string[] | The categories of the keywords that the AI extracted, e.g. 'make', 'model', 'year' |
| aiSearchKeywords? | string[] | The keywords that the AI extracted from the search term to apply filters |
| aiSearchResultCount? | string | The number of results that were found and displayed after the AI applied filters based on the search term |
| aiSearchStatus? | string | The status of the AI search, e.g. 'success' if filters were applied successfully |
| aiSearchTerm? | string | The search term that the user entered which triggered the AI to apply filters |
| 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 | "ai_search_submit" | Event name |
| eventId | string | Event UUID |
| eventTimestamp | 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 |
| sessionId | number | Session ID |
| 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 |
| 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_explore_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 |
CarListingAddToCompare
When a user clicks on the 'compare' option on a car card in the car listing 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_listing_add_to_compare" | 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. |
| nrCarsCompared? | string | Count of cars compared in the current session |
| 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 |
CarListingClickCard
Used to understand how different positions in the listing might affect selection of cars (upsell)
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. |
| carColor? | string | Color of the car |
| carDiscountPercent? | number | Percentage discount applied to the car price |
| carDiscountPrice? | number | Price discount applied to the car's total price |
| 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 | Discounted price of the car after applying promotions or offers |
| 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? | "car_listing_click_card" | When a user clicks a car card on the car listing page |
| 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' |
| listingPosition? | string | Identifies the position of a car model, accessory, or any product Volvo sells, aiding in optimizing product placement and sales strategies. |
| 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 categoriz
