> ## Documentation Index
> Fetch the complete documentation index at: https://www.help.creatora.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When building or modifying an integration with the Creatora API, start with https://www.help.creatora.io/en/api/build-with-ai.md. Retrieve the current GraphQL SDL from https://api.creatora.io/sdl before relying on API schema information.

# Compare traffic, registrations and paid customers

> Review activity counts for a period and registrations per 100 recorded sessions.

Compare tracked sessions, newly registered Students and distinct paid customers during the same period. This gives you an activity report for a launch or campaign.

The example covers **September 1, 2026 at 00:00 UTC** (`1788220800000`) through **October 1, 2026 at 00:00 UTC**, exclusive (`1790812800000`). Replace the timestamps for your period. Web Analytics date bounds are strict, so the query starts one millisecond earlier to include the first instant.

## Request

<RequestExample>
  ```graphql theme={null}
  {
    analytics { webAnalytics {
      visitsByMonth(startMillis: 1788220799999, endMillis: 1790812800000) { total }
      pageViewsByVisitorType(startMillis: 1788220799999, endMillis: 1790812800000) { guests students }
    } }
    students(createdOn: { range: [1788220800000, 1790812800000] }) { id role createdOn }
    orders(status: { equals: [succeeded] }, closedOn: { range: [1788220799999, 1790812800000] }) {
      id closedOn amountNetCharge student { id role }
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Illustrative response theme={null}
  {
    "data": {
      "analytics": {
        "webAnalytics": {
          "visitsByMonth": {
            "total": 1200
          },
          "pageViewsByVisitorType": {
            "guests": 1600,
            "students": 900
          }
        }
      },
      "students": [
        {
          "id": "33333333-3333-4333-8333-333333333333",
          "role": "student",
          "createdOn": 1788224400000
        }
      ],
      "orders": [
        {
          "id": "55555555-5555-4555-8555-555555555555",
          "closedOn": 1788228000000,
          "amountNetCharge": 49,
          "student": {
            "id": "33333333-3333-4333-8333-333333333333",
            "role": "student"
          }
        }
      ]
    }
  }
  ```
</ResponseExample>

## Use the result

```javascript theme={null}
const start = 1788220800000;
const end = 1790812800000;
const sessions = response.data.analytics.webAnalytics.visitsByMonth.total;
const registrations = new Set(response.data.students
  .filter(student => student.role === "student" && student.createdOn >= start && student.createdOn < end)
  .map(student => student.id)).size;
const paidCustomers = new Set(response.data.orders
  .filter(order => order.closedOn !== null && order.closedOn >= start && order.closedOn < end &&
    order.amountNetCharge > 0 && order.student?.role === "student")
  .map(order => order.student.id)).size;
const pageRecords = response.data.analytics.webAnalytics.pageViewsByVisitorType;
const report = {
  trackedSessions: sessions,
  newRegisteredStudents: registrations,
  distinctPaidCustomers: paidCustomers,
  registrationsPer100Sessions: sessions > 0 ? registrations / sessions * 100 : null,
  anonymousSessionPageRecords: pageRecords.guests,
  accountAssociatedSessionPageRecords: pageRecords.students
};
```

Read `registrationsPer100Sessions` as an activity ratio. The API does not expose a visitor-to-Student join in these aggregates, so the numerator and denominator do not identify the same people. Repeat sessions, tracking gaps and registration outside a recorded session can affect the ratio. It is not a measured visitor-to-registration conversion rate.

Paid customers include existing Students who bought in the period. Use [registration-cohort conversion](/en/api/recipes/measure-registration-to-paid-conversion) to measure how many newly registered Students became paying customers. This report excludes free Orders and Orders currently refunded or disputed; manually registered successful paid Orders are included. Orders without a linked Student cannot be counted as identified customers.

The `guests` and `students` fields count anonymous versus account-associated session-page records. They do not count new visitors or registrations. The processing code checks actual close dates because the Order date filter also matches creation dates, and removes the inclusive upper boundary from the Student registration query.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.