Spec: Car Rental Events

Event Lifecycle Overview

Browsing

ActionDescription
Products SearchedUser searched for products

Core Ordering

ActionDescription
Product ViewedUser viewed a product details
Checkout StartedUser initiated the order process (a transaction is created)
Payment Info EnteredUser added payment information
Order CompletedUser completed the order

Browsing

Products Searched

Fire this event when a visitor searches for products.

This event supports the following semantic properties:

PropertyTypeDescription
queryStringQuery the user searched with
pickup_locationStringRental car pickup location
pickup_dateDateRental car pickup date
dropoff_locationStringRental car dropoff location
dropoff_dateDateRental car dropoff date
couponStringCoupon searched with

Example:

analytics.track('Products Searched', {
  query: 'JFK truck'
  pickup_location: 'jfk',
  pickup_date: 'Sat Jun 18 2016 12:00:00 GMT-0700',
  dropoff_location: 'phl',
  dropoff_date: 'Thu Jun 24 2016 12:00:00 GMT-0700',
  coupon: 'MIT2013',
  filters: [
      {
        type: 'vehicle-type',
        value: 'truck'
      }
    ],
});

Core Ordering

Product Viewed

Fire this event when a visitor views a product. That view might happen on a page, screen, or preview modal.

This event supports the following semantic properties:

PropertyTypeDescription
product_idStringDatabase id of the product being viewed
categoryStringProduct category being viewed
nameStringName of the product being viewed
pickup_locationStringRental car pickup location
pickup_dateDateRental car pickup date
dropoff_locationStringRental car dropoff location
dropoff_dateDateRental car dropoff date
couponStringCoupon code associated with a product (e.g MAY_DEALS_3)

Example:

analytics.track('Product Viewed', {
  product_id: '507f1f77bcf86cd799439011',
  category: 'Truck',
  name: 'Ford F-150',
  pickup_location: 'jfk',
  pickup_date: 'Sat Jun 18 2016 12:00:00 GMT-0700',
  dropoff_location: 'phl',
  dropoff_date: 'Thu Jun 24 2016 12:00:00 GMT-0700',
  coupon: 'MIT2013'
});

Note: The Product Viewed event is aliased to the Viewed Product event from e-commerce v1 spec.

Checkout Started

Fire this event whenever an order/transaction was started. Fire on the page that the customer lands on after they press the checkout button.

This event supports the following semantic properties:

PropertyTypeDescription
checkout_idStringCheckout ID
order_idStringOrder/transaction ID
totalNumberRevenue with discounts and coupons added in. Note that our Google Analytics Ecommerce integration accepts total or revenue, but not both. For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied
taxNumberTotal tax associated with the transaction
discountNumberTotal discount associated with the transaction
currencyStringCurrency code associated with the transaction
couponStringTransaction coupon redeemed with the transaction
cars.$.product_idStringDatabase id of the car being viewed
cars.$.categoryStringProduct category being viewed
cars.$.nameStringName of the product being viewed
cars.$.pickup_locationStringRental car pickup location
cars.$.pickup_dateDateRental car pickup date
cars.$.dropoff_locationStringRental car dropoff location
cars.$.dropoff_dateDateRental car dropoff date
couponStringCoupon code associated with a car (e.g MAY_DEALS_3)

Example:

analytics.track('Checkout Started', {
  checkout_id: 'fksdjfsdjfisjf9sdfjsd9f',
  order_id: '50314b8e9bcf000000000000',
  total: 100,
  revenue: 75,
  tax: 25,
  discount: '25',
  currency: 'USD',
  coupon: 'cool-summer',
  cars: [{
    product_id: '507f1f77bcf86cd799439011',
    category: 'Truck',
    name: 'Ford F-150',
    pickup_location: 'jfk',
    pickup_date: 'Sat Jun 18 2016 12:00:00 GMT-0700',
    dropoff_location: 'phl',
    dropoff_date: 'Thu Jun 24 2016 12:00:00 GMT-0700',
    coupon: 'MIT2013'
  }]
});

Note: The Checkout Started event is aliased to the Started Order event from Segment’s GA Enhanced E-Commerce Integrations.

Payment Info Entered

Fire this event whenever payment information has been successfully entered.

This event supports the following semantic properties:

PropertyTypeDescription
checkout_idStringCheckout transaction ID
order_idStringOrder ID (optional)

Example:

analytics.track('Payment Info Entered', {
      checkout_id: '39f39fj39f3jf93fj9fj39fj3f',
      order_id: 'dkfsjidfjsdifsdfksdjfkdsfjsdfkdsf'
    });

You can have as many or as few steps in the checkout funnel as you’d like. You’ll still need to track the Order Completed event per our standard e-commerce tracking API after you’ve tracked the checkout steps.

Note: The Payment Info Entered event is aliased to the Completed Checkout Step event from Segment’s GA Enhanced E-Commerce Integration.

Order Completed

Fire this event whenever an order/transaction was successfully completed by the customer.

This event supports the following semantic properties:

PropertyTypeDescription
checkout_idStringCheckout ID
order_idStringOrder/transaction ID
order_dateDateDate the transaction occurred, if blank we’ll send as the date of the event
payment_methodStringType of Payment used here (e.g. Visa)
affiliationStringStore or affiliation from which this transaction occurred
totalNumberRevenue with discounts and coupons added in. Note that our Google Analytics Ecommerce integration accepts total or revenue, but not both. For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied
taxNumberTotal tax associated with the transaction
discountNumberTotal discount associated with the transaction
couponStringTransaction coupon redeemed with the transaction
currencyStringCurrency code associated with the transaction
carsArrayCars in the order
cars.$.product_idStringDatabase id of the car being viewed
cars.$.categoryStringThe category of the car
cars.$.nameStringThe type of car
cars.$.pickup_locationStringWhere the car will be picked up
cars.$.pickup_dateDateThe date the car will be picked up
cars.$.dropoff_locationStringWhere the car will be dropped off
cars.$.dropoff_dateDateDate the car will be returned
cars.$.priceStringThe price of the ticket

Example:

analytics.track('Order Completed', {
  checkout_id: 'fksdjfsdjfisjf9sdfjsd9f',
  order_id: '50314b8e9bcf000000000000',
  order_date: 'Sat Jun 13 2016 12:00:00 GMT-0700',
  payment_method: 'Visa',
  coupon: 'MIT2013',
  total: 100,
  revenue: 75,
  tax: 25,
  discount: '25',
  coupon: 'cool-summer',
  currency: 'USD',
  cars: [
    {
    product_id: '507f1f77bcf86cd799439011',
    category: 'Truck',
    name: 'Ford F-150',
    pickup_location: 'jfk',
    pickup_date: 'Sat Jun 18 2016 12:00:00 GMT-0700',
    dropoff_location: 'phl',
    dropoff_date: 'Thu Jun 24 2016 12:00:00 GMT-0700',
    price: 100
    }
  ]
});

Note: The Order Completed event is aliased to the Completed Order event from E-Commerce spec v1.


If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!