By default, JWP tracks only playback data with <a href="/platform/docs/analytics-integrate-with-google-analytics" target="_blank">Google Analytics</a> as an integrated solution. Other third-party analytics services that can be used with the Player JavaScript API. Provided that the third-party analytics service can send information via Javascript, all API events can hypothetically be tracked and measured.

<br />

## Listening for events

A full introduction to our player's API can be found on our [API Introduction](🔗) page. In a nutshell, JWP's API is capable of listening for specific changes, either initiated by a user or by API, and then returning information about its use. A very basic example of detecting when a user initiates a mute would be:

For a full list of trackable player events grouped by category, please visit our [API reference page](🔗).

<br /> <hr />

## Sending events with Google Analytics

Now that you're able to determine that an event occurred on a page, a ping will need to be sent to an analytics platform for tracking. If your analytics platform of choice is Google Analytics, you'll need to initiate a **send** event. As mentioned in our previous article [here](🔗), you'll need to make sure that you are implementing the new analytics.js on your page, rather than the older ga.js.

Let's assume that we have a single player on a page. If I would like track with our Google Analytics account when an error has occurred with our player (and the error itself), we can use the following code:

<br />

Once triggering an error state, we are able to check into our Google Analytics page and see our tracked event (Under realtime events). In this case, **Errors** will populate in the **JWP Events** category, and the error itself will be listed under **Actions**. The exact error message will be listed under the **Label** section.

More information about tracking events with the above code can be found <a href="" target="_blank">here</a> in Google's own analytics documentation.

<br /> <hr />

## Sending Events With comScore

Much like a custom GA implementation, if you are utilizing comScore analytics, it is possible to create a setup similar to the above. The below table shows comScore events and their JWP API equivalents:

Comscore EventJWP API Event
Fullscreen State[getFullscreen();](🔗)
Media Position[getPosition();](🔗)
Video Source[getPlaylistItem().file](🔗)
Current Bitrate[getQualityLevels()](🔗)[[getCurrentQuality()]](🔗).bitrate

<br /> <hr />

## Sending events with Adobe Analytics

You can use the JW Adobe Heartbeat plugin to integrate Adobe Video Analytics with your player events.

<br />

### Requirements

Before you add the JW Adobe Heartbeat plugin to your player, you need the following items:

  • Adobe credentials

  • Adobe Heartbeat tracking server domain

  • Adobe Heartbeat channel name

  • Adobe Heartbeat channel type

  • Page name

<br />

### Implementation

Use the following steps to implement and configure this setup:

  1. Clone the <a href="" target="_blank">JW Adobe Heartbeat plugin repository</a>.

  2. Add your Adobe credentials to <a href="" target="_blank">**scripts/AppMeasurement.js**</a>.

  3. Add your Adobe credentials to <a href="" target="_blank">**scripts/VisitorAPI.js**</a>.

  4. In the `<head>` of the page with your player, add **VistorAPI.js**, **AppMeasurement.js**, and **VideoHearbear.min.js**.

  5. In the `setup()` for your player, define a `plugins../scripts/JWHeartbeat.js` object and set the values in the table below.

**adobeTrackingDomain** `string`Adobe Heartbeat tracking server domain
**channel** `string`Adobe Heartbeat channel name
**channelName** `string`Adobe Heartbeat channel type
**debug** `boolean`Enables debugging within the JWHeartbeat.js plugin
**pageName** `string`Page name

<br />

### Full code sample

<br />