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

# Top Referrers

Referrer domains driving a conversion event.

Ranks the referrer domains (`page.referrer_domain`) attached to a conversion event over the window.

* **Direct traffic** (no referrer) is reported with the label `(direct)`.
* Each row's `percentage` is its share of the conversion event's `total`.
* Pass `user_id` to scope to a single customer belonging to the site.

Use it for "which external sources drive the most subscriptions?"

# 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/top-referrers": {
      "get": {
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The dimension value for this bucket. Empty referrers are reported as `(direct)`."
                          },
                          "count": {
                            "type": "integer",
                            "description": "Number of matching events in this bucket."
                          },
                          "percentage": {
                            "type": "number",
                            "description": "This bucket's share of the total matched events, as a percentage."
                          }
                        }
                      },
                      "description": "Top referrer domains, highest count first."
                    },
                    "conversion_event": {
                      "type": "string",
                      "description": "The conversion event that was attributed."
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total matching conversion events in the window."
                    },
                    "user_id": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The customer the result was scoped to, or null for site-wide."
                    },
                    "days": {
                      "type": "integer",
                      "description": "Size of the resolved window, in days."
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "data": [
                        {
                          "label": "google.com",
                          "count": 96,
                          "percentage": 46.2
                        },
                        {
                          "label": "(direct)",
                          "count": 58,
                          "percentage": 27.9
                        }
                      ],
                      "conversion_event": "Subscription Created",
                      "total": 208,
                      "user_id": null,
                      "days": 30
                    }
                  }
                }
              }
            }
          },
          "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."
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "site_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "The site ID to scope this request to."
          },
          {
            "name": "conversion_event",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The conversion event to attribute. Common values: \"Subscription Created\", \"Registered\", \"Newsletter Email Submitted\", \"Invoice Paid\". The valid set is per-site; an unrecognized value returns a 400 listing the events this site has recorded."
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Scope the result to a single customer belonging to the site. Returns 404 if the customer is not on this site."
          },
          {
            "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."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Maximum number of referrers to return (1–100, default 10)."
          }
        ],
        "operationId": "get_analytics-customers-activity-top-referrers",
        "summary": "Top Referrers",
        "description": "Referrer domains driving a conversion event."
      }
    }
  },
  "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)
* [Conversion Rate by Dimension](https://docs.pelcro.com/reference/api-core-analytics-customers-activity-conversion-rate-by-dimension.md)
* [Customer Journey](https://docs.pelcro.com/reference/api-core-analytics-customers-activity-journey.md)