# Chartbeat


> Send your event data from RudderStack to Chartbeat.


[Chartbeat](https://chartbeat.com/) is the industry leader for real-time content and web analytics, based on JavaScript.

RudderStack supports sending your events to Chartbeat from the web native SDK by calling RudderStack's APIs.

## Connection compatibility

  
  
  
  <div class="quick-info">
    <div>
      <div class="connection-modes-column-headers">
        <table>
          <tr class="connection-modes-column-headers">
            <th colspan="4">
            Destination Information
          </th>
        </tr>
          <tr class="destination-info-content">
            <td>
              <ul>
                <li>
                  <b>Status:</b> Generally Available 
                </li>
                <li>
                  <b>Supported sources:</b>  
                  
                      Web
                  
                </li>
                <li>
                  Refer to it as <b>Chartbeat</b> in the <a href="/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/filtering/#filtering-destinations">Integrations object</a>.
                </li>
              </ul>
            </td>
          </tr>
        </table>
      </div>
      <div class="table-content connection-modes-table">
        
          <table>
            <tr class="heading connection-modes-header">
              <th colspan="5">
              Connection Modes
              <a href=/docs/destinations/rudderstack-connection-modes>
                <i class="fa-regular fa-circle-info"></i>
              </a>
            </th>
          </tr>
            <tr class="connection-modes-column-headers">
              <th>Source</th>
              <th>Cloud mode</th>
              <th>Device mode</th>
              <th>Hybrid mode</th>
              <th>Device Mode Transformations
                <a href=/docs/transformations/usage/#device-mode>
                  <i class="fa-regular fa-circle-info"></i>
                </a>
              </th>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Web
                
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
                
              </td>
            </tr>
            
          </table>
         
      </div>
      <div class="table-content message-types-table">
          <table>
            <tr class="heading message-types-header">
              <th colspan="9">
              Supported Message Types
            </th>
          </tr>
          <tr class="message-types-column-headers">
            <th>Source</th>
            <th>Identify</th>
            <th>Page</th>
            <th>Track</th>
            <th>Screen</th>
            <th>Group</th>
            <th>Alias</th>
            <th>Record</th>
            <th>AudienceList</th>
          </tr>
          
          
          
            
              
              
          
          
          
            
              <tr class="heading message-mode-header">
                <th colspan="9">Device mode</th>
              </tr>
              
              <tr class="message-mode-row">
                <td>
                  Web
                  
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                  <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
              </tr>
              
            
          
            </table>
        </div>
    </div>
  </div>
  

## Domain allowlisting for web device mode

In web device mode, RudderStack loads the Chartbeat native SDK from `https://static.chartbeat.com`. Depending on your Content Security Policy, [allow these sources](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/load-js-sdk/#allowlist-destination-domain) in `script-src`.

You can monitor vendor scripts with a [report-only Content Security Policy](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/sdk-hardening/#allow-vendor-sdk-urls-in-your-content-security-policy).

## Get started

Once you have ascertained that the platform is supported by Chartbeat, please follow these steps:

- From your [RudderStack dashboard](https://app.rudderlabs.com/), add the source and Chartbeat as a destination.
- In the Connection Settings page, please enter the relevant information in the fields shown in the following screen:

![](/docs/images/image (18).webp)Connection Settings for Chartbeat

Each field is as explained below:

- **Domain** - Enter the domain name with which your Chartbeat account was configured. Don't append any extra url parameters to it. For example: `rudderstack-test.com`
- **UID -** Enter your Chartbeat UID here. You can find the UID on the Chartbeat [Adding The Code](https://chartbeat.com/docs/adding_the_code/) page.
- **Send Name and Category as Title** - Enable this setting if you want the RudderStack `page` API to send the page title as visible in Chartbeat dashboard as `page category` + `page name` .

**Info:** If this setting is enabled and the category is not set, RudderStack only sends the name as the page title.

- **Use Chartbeat video script** - Enable this setting if you want the RudderStack SDK to download `chartbeat_video.js` . This file is provided by Chartbeat to track and capture video interactions. Once the setting is enabled, the script will start capturing the play and pause events of mainly the HTML5 videos from the `<video ... </video>` tag.

## Page

Making a call to the `page` API will send out an object to Chartbeat containing the information of your page and its related properties.

A sample `page` call is shown below:

```javascript
rudderanalytics.page("section-name", "home", {
  path: "path",
  url: "url",
  title: "title",
  search: "search",
  referrer: "referrer",
  author: "author-name",
});
```

The above code snippet populates the following properties along with the associated values:

| Property   | Value        |
| :--------- | :----------- |
| `category` | section-name |
| `name`     | home         |
| `author`   | author-name  |
| `path`     | path         |
| `url`      | url          |
| `title`    | title        |
| `search`   | search       |
| `referrer` | referrer     |

### Single Page Applications

For Single Page Applications \(SPAs\), the first `page` call asynchronously loads `chartbeat.js` \(or `chartbeat_video.js`\) with the properties specified in the `page` call. All further `page` calls are sent to Chartbeat by calling Chartbeat's virtual `page` API with the same properties that were passed to the initial `page` call.

## FAQ

#### Where do I find the Chartbeat UID?

You can find your Chartbeat UID on Chartbeat's [Adding The Code](https://chartbeat.com/docs/adding_the_code/) page.

