Cart Abandonment

Cart abandonment measures the percentage of users who add items to their cart but do not complete the purchase. It’s a key metric for identifying checkout friction and lost opportunities.

Metric model

  • Name
    metric
    Type
    string
    Description

    Always cart_abandonment for this metric.

  • Name
    value
    Type
    float
    Description

    Abandonment rate for the current period (e.g., 55.54).

  • Name
    previous
    Type
    float
    Description

    Abandonment rate from the previous period.

  • Name
    change
    Type
    float
    Description

    Percentage change between current and previous periods.

  • Name
    formattedValue
    Type
    string
    Description

    Display-ready version of the current abandonment rate.

  • Name
    formattedPrevious
    Type
    string
    Description

    Display-ready version of the previous abandonment rate.

  • Name
    period.id
    Type
    string
    Description

    Timeframe used for the metric (e.g., 7d).

  • Name
    period.name
    Type
    string
    Description

    Human-friendly name of the time period.

  • Name
    periodRange.current.start
    Type
    string
    Description

    ISO start time of the current period.

  • Name
    periodRange.current.end
    Type
    string
    Description

    ISO end time of the current period.

  • Name
    periodRange.previous.start
    Type
    string
    Description

    ISO start time of the previous period.

  • Name
    periodRange.previous.end
    Type
    string
    Description

    ISO end time of the previous period.

  • Name
    performance.duration
    Type
    float
    Description

    Computation time in milliseconds.

  • Name
    performance.formatted
    Type
    string
    Description

    Display-friendly duration string.


GET/api/metrics/cart_abandonment

Retrieve cart abandonment metric

This endpoint returns the percentage of carts that were abandoned during the selected period.

Optional query parameters

Request

GET
/api/metrics/cart_abandonment
curl -G http://localhost:3000/api/metrics/cart_abandonment \
  -H "Authorization: Bearer {token}" \
  -d period=7d

Response

{
  "metric": "cart_abandonment",
  "value": 55.54,
  "previous": 92.66,
  "change": -40.06,
  "formattedValue": "55,54%",
  "formattedPrevious": "92,66%",
  "period": {
    "id": "7d",
    "name": "Last 7 days"
  },
  "periodRange": {
    "current": {
      "start": "2025-03-16T08:50:55.028Z",
      "end": "2025-03-23T08:50:55.027Z"
    },
    "previous": {
      "start": "2025-03-09T08:50:55.028Z",
      "end": "2025-03-16T08:50:55.027Z"
    }
  },
  "performance": {
    "duration": 891.09,
    "formatted": "891 ms"
  }
}

Use cases

  • Monitor drop-offs during checkout
  • Identify performance changes after UX changes
  • Compare abandonment by traffic source or segment

Was this page helpful?