---
updatedAt: 2026-07-09T23:15:17.000Z
agentTools:
  projectIndex: https://docs.pelcro.com/llms.txt
---

# Customer Journey

A single customer's chronological activity events.

Returns one customer's activity events, most recent first, page-paginated.

* **`user_id` is required** and the customer must belong to the site; a customer from another site returns `404`.
* Paginate with `page` and `limit` (events per page); pagination details are in the response `meta` (`current_page`, `per_page`, `total`, `last_page`).
* Each event includes its time, name, code, page path, referrer domain, country, platform, and UTM source/campaign.

Unlike the other endpoints, this is a per-event list rather than an aggregation.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "core-api",
    "version": "1.88"
  },
  "servers": [
    {
      "url": "https://www.pelcro.com/api/v1/core"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      },
      "sec1": {
        "type": "apiKey",
        "in": "query",
        "name": "site_id"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/analytics/customers/activity/journey": {
      "get": {
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "description": "Events, most recent first.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Event timestamp (UTC, ISO 8601)."
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Event name."
                          },
                          "code": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Numeric event code."
                          },
                          "page_path": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Path of the page where the event fired."
                          },
                          "referrer_domain": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Referrer domain."
                          },
                          "country": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO country code."
                          },
                          "platform": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Browser platform."
                          },
                          "utm_source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "UTM source."
                          },
                          "utm_campaign": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "UTM campaign."
                          }
                        }
                      }
                    },
                    "links": {
                      "type": "object",
                      "description": "Pagination links (first, last, prev, next)."
                    },
                    "meta": {
                      "type": "object",
                      "description": "Pagination metadata (current_page, per_page, total, last_page, from, to, path)."
                    },
                    "user_id": {
                      "type": "integer",
                      "description": "The customer whose journey was returned."
                    },
                    "days": {
                      "type": "integer",
                      "description": "Size of the resolved window, in days."
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "data": [
                        {
                          "time": "2026-06-30T14:22:05Z",
                          "name": "Subscription Created",
                          "code": 40000,
                          "page_path": "/pricing",
                          "referrer_domain": "google.com",
                          "country": "US",
                          "platform": "Windows",
                          "utm_source": "newsletter",
                          "utm_campaign": "spring_promo"
                        },
                        {
                          "time": "2026-06-30T14:19:41Z",
                          "name": "Page Viewed",
                          "code": 10000,
                          "page_path": "/pricing",
                          "referrer_domain": "google.com",
                          "country": "US",
                          "platform": "Windows",
                          "utm_source": "newsletter",
                          "utm_campaign": "spring_promo"
                        }
                      ],
                      "links": {
                        "first": "…?page=1",
                        "last": "…?page=3",
                        "prev": null,
                        "next": "…?page=2"
                      },
                      "meta": {
                        "current_page": 1,
                        "from": 1,
                        "last_page": 3,
                        "path": "…",
                        "per_page": 10,
                        "to": 10,
                        "total": 24
                      },
                      "user_id": 56789,
                      "days": 365
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request — a parameter failed validation (unknown event name or dimension, malformed date, out-of-range limit, etc.).",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": {
                        "status": 400,
                        "message": "Invalid request, please try again."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": "Unauthenticated."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The requested customer does not belong to this site.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": {
                        "status": 404,
                        "message": "Customer not found for this site."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "site_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "The site ID to scope this request to."
          },
          {
            "name": "user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "The customer whose journey to return. Must belong to the site."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Page number (default 1)."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Events per page (1–100, default 10)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start of the window in YYYY-MM-DD. Use with `to`. When omitted, a trailing default window is used. The from–to span is capped at the site’s activity retention window (90 days by default)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End of the window in YYYY-MM-DD. Must be on or after `from` and no later than today."
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "description": "Alternative to `from`/`to`: size of the trailing window in days (1–90). Bounded by the site’s activity retention window."
          }
        ],
        "summary": "Customer Journey",
        "operationId": "get_analytics-customers-activity-journey",
        "description": "A single customer's chronological activity events."
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [Count Events](https://docs.pelcro.com/reference/api-core-analytics-customers-activity-count-events.md)
* [Top Pages](https://docs.pelcro.com/reference/api-core-analytics-customers-activity-top-pages.md)
* [Top Referrers](https://docs.pelcro.com/reference/api-core-analytics-customers-activity-top-referrers.md)
* [Conversion Rate by Dimension](https://docs.pelcro.com/reference/api-core-analytics-customers-activity-conversion-rate-by-dimension.md)