Skip to main content
Every event the pagent SDK records is also dispatched on window as a pagent:event CustomEvent. Listen to it to debug your tracking or to forward pagent data to your own tools.
To send test assignments and conversions to Google Tag Manager, JENTIS or another dataLayer, you don’t need a listener. Turn on tag manager forwarding instead.
This page is about reading what pagent records. To send your own events to pagent, see Sending events. Here is an example:
Note: If no session is active, pagent will not emit any events on the pagent:event bus.

Event types

Below is an overview of all event kinds that pagent emits.

Common properties

The following attributes are included in every event:

event properties

Events of kind event carry these properties alongside the common ones:

session_start properties

The session_start event is the one that carries the visitor’s experiment context. When the visitor is enrolled in a running test, it includes the following additional properties (alongside the common properties above):
Note: All of these experiment fields are absent (or null) when there is no active pagent test on the current page, for example analytics-only sessions or visitors not enrolled in any running test. Always check event.experiment_id before reading the others, as the JENTIS example below does.

Example integration

You can also forward individual pagent events to other analytics platforms by hand. The example below sends the conversion event to JENTIS using its push-based data layer. For JENTIS itself, tag manager forwarding now does this without code; use the example as a pattern for other tools.
This keeps your implementation lightweight. You only need to listen for pagent events and decide which ones you want to forward. The example above listens exclusively for the conversion event and immediately submits it to JENTIS. To forward your own events as well, also match event.kind === "event" and pass event.label along.