# Page


> Get started with the RudderStack Page API call.


The `page` call lets you record your website's page views with any additional relevant information about the viewed page. Many destinations require the `page` events to be called at least once every page load.

**Info:** The [RudderStack JavaScript SDK](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/) includes a `page` method in its snippet just after the `rudderanalytics.load` method.

## Sample payload

Here is a sample payload of a `page` call after removing the [common fields](https://www.rudderstack.com/docs/event-spec/standard-events/common-fields/):

```json
{
  "type": "page",
  "name": "Home",
  "properties": {
    "title": "Home | RudderStack",
    "url": "http://www.rudderstack.com"
  }
}
```

The corresponding event that generates the above payload via the [JavaScript SDK](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/) is:

```javascript
rudderanalytics.page("Home")
```

**Info**

The JavaScript SDK automatically gathers the page `title` and `url` and passes them into the event payload.

However, note that the HTTP API or the server-side SDKs do not automatically capture these properties.

## Send a sample `page` call

Use RudderStack's **Event Playground app** to send sample events to RudderStack and test the data flow without any instrumentation.

Click **Send** to see the API call in the **Network** tab of your browser's developer tools.

<html>
  <body>
    <div>
      <div
        id='rs-sdk-embed'
        data-dataplane-url="https://rudderstack-dataplane.rudderstack.com"
        data-write-key="2hpYce3XOwxPfNkagiWG8A1Fy5C"
        data-examples-endpoint="/default-page.json"
      />
    </div>
  </body>
  <script src='https://playground.rudderstack.com/embed.js'></script>
</html>

Follow these steps to use the **Event Playground app** to send test events to your account:

1. Sign in to the [RudderStack dashboard](https://app.rudderstack.com/). Note the data plane URL at the top of the default **Connections** page.
![Data plane URL](/docs/images/general/data-plane-url.webp)
1. Set up a [source](https://www.rudderstack.com/docs/dashboard-guides/sources/#add-a-source) and note its write key.
![JavaScript SDK source write key](/docs/images/get-started/quickstart/js-write-key.webp)
1. Click **Use My Account** in the **Event Playground app** below and specify the write key and data plane URL obtained in the above steps.
<html>
  <body>
    <div>
      <div
        id='rs-sdk-embed'
        data-dataplane-url="https://rudderstack-dataplane.rudderstack.com"
        data-write-key="2hpYce3XOwxPfNkagiWG8A1Fy5C"
      />
    </div>
  </body>
  <script src='https://playground.rudderstack.com/embed.js'></script>
</html>
1. Click **Save**.
2. Select the required **API Method** from the dropdown. You can also edit the relevant fields or traits/properties.
3. Click **Send to my account** to send the event.
4. Go to the [Live Events](https://www.rudderstack.com/docs/monitor/live-events/#view-source-live-events) viewer of your source (set up in Step 2) to verify that the event is successfully received.

## Page fields

Apart from the [common fields](https://www.rudderstack.com/docs/event-spec/standard-events/common-fields/), the `page` call accepts the following fields:

| **Field**    | **Type** | **Presence** | **Description** |
| :----------- | :------- | :----------- | :---------------- |
| `name` | String   | Optional | The name of the page. |
| `category` | String   | Optional | The category of the page. |
| `properties` | Object   | Optional | Includes the properties of the page like the `url`, `referrer`, etc. <br />For more information, see the [Properties](#properties) section below. |

## Properties

Properties are additional information that describe the viewed page.

RudderStack has reserved some standard properties listed in the following table and handles them in a special manner. For instance, `path` should always be the URL path of the page and `referrer` should be the URL of the previously viewed page.

<table>
  <thead>
    <tr>
      <th>
        <b>Property</b>
      </th>
      <th>
        <b>Type</b>
      </th>
      <th>
        <b>Description</b>
      </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <code class="inline-code">name</code>
      </td>
      <td>String</td>
      <td>
        <p>The page name. This is a reserved property for future use.</p>
      </td>
    </tr>
    <tr>
      <td>
        <code class="inline-code">category</code>
      </td>
      <td>String</td>
      <td>
        <p>The page category.</p>
      </td>
    </tr>
    <tr>
      <td>
        <code class="inline-code">path</code>
      </td>
      <td>String</td>
      <td>The path component of the page URL.</td>
    </tr>
    <tr>
      <td>
        <code class="inline-code">url</code>
      </td>
      <td>String</td>
      <td>
        <p>Full page URL. RudderStack first looks for the canonical URL. If it is not present, RudderStack uses the <code class="inline-code">location.href</code> component from the DOM API.</p>
      </td>
    </tr>
    <tr>
      <td>
        <code class="inline-code">title</code>
      </td>
      <td>String</td>
      <td>The page title.</td>
    </tr>
    <tr>
      <td>
        <code class="inline-code">referrer</code>
      </td>
      <td>String</td>
      <td>
        <p>The full URL of the previous page visited by the user.</p>
      </td>
    </tr>
    <tr>
      <td>
        <code class="inline-code">search</code>
      </td>
      <td>String</td>
      <td>
        <p>The querystring component of the page URL.</p>
      </td>
    </tr>
    <tr>
      <td>
        <code class="inline-code">keywords</code>
      </td>
      <td>Array</td>
      <td>
        <p>A list or array of keywords describing the page. These keywords are similar to the keywords used for SEO purposes. This property is not automatically collected.</p>
      </td>
    </tr>
  </tbody>
</table>
