> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/engage/-MGi9-KKLwnWfoD36Ot6/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/engage/-MGi9-KKLwnWfoD36Ot6/fundamentals/engage-events.md).

# Engage Events

Description about various events available with the Engage Plugin.

The Engage plugin fires events through an HTML document object. These events are generally called **Connext Events**. A consumer can choose any option to listen to Connext Events, that is preferable.

All **event listeners** in Connext are defined as **Callback functions** in the **Init method**. Every event returns an event argument with the event-specific data.

To register an event using callbacks, the specific code should be included in the appropriate call-back function. Refer to the example below:

{% code overflow="wrap" %}

```
Var mg2Connext = Connext.init({
    siteCode: 'XX',
    configCode: 'CFG1',
    publicEventHandlers: {
        onActionShown: function(e){
                var nativeEventDetails = e; // data of native JS event
                var customDetails = e.detail;  // custom data of event
                 // listener’s code goes here
        },
        AnyEventName: function (e) {
                // listener’s code goes here
        },
    },
  });
```

{% endcode %}

To register any event using a document object, the specific code should be included under the appropriate document.addEventListener () function. Refer to the example below:

```
document.addEventListener("Connext_event_name",function(e){
                 var nativeEventDetails = e; // data of native JS event
                 var customDetails = e.detail;  // custom data of event
                 // listener’s code goes here
        });
```

Each callback function of an event gets the event object with parameters:

```
{
    Aui: string //Anonymous User Id
    AuthSystem: AUTHSYSTEM, //mg2, auth0, janrain, custom
    AuthProfile: AuthProfileModel
    MG2AccountData: details,
    CampaignId: number,
    CampaignName: string,
    Config: [ConfigPublicModel](#configuration),
    Conversation: ConversationModel,
    EventData: determinate for each event type,
    MeterLevelId: number,
    MeterLevel: string,  //"Metered | Free | Premuim"
    MeterLevelMethod: string , //Default or Dynamic
}
```

## Event Group

An event group works the same as a simple event, but it fires every time when any one event of this group is triggered. The argument of a group event is similar to the argument of a simple event that triggers a group event.

The Event groups in Engage are as follows:

1\.     onAnyLoadEvent

2\.     onAnyActionEvent

3\.     onAnyAccountStatusEvent

4\.     onAnyIPAccessEvent

5\.     onAnyActivationEvent

6\.     onAnyLoginTemplateEvent

7\.     onAnyNewsletterEvent

8\.     onAnyRegistrationEvent
