> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Aggregation

> Aggregation webhooks notify you when any new data is available after a successful aggregation, including counts of new and updated transactions.

These webhooks fire only after a completed aggregation, including background aggregations. Actions performed on the member through other endpoints will not trigger the webhook.

| Field | Data type | Description |
| :- | :- | :- |
| `action` | String | The action that triggered the webhook. For example, `member_data_updated`. |
| `completed_at` | Integer | The date and time when the process that triggered the webhook was finished. Given in Unix time. |
| `completed_on` | String | The date on which the process that triggered the webhook was finished. |
| `is_background` | Boolean | Whether the aggregation was performed manually in the foreground or automatically in the background. |
| `job_guid` | String | The unique identifier for MX's internal aggregation process. Defined by MX.<br /><br />This field is not relevant for partners using the Platform API and should be ignored. |
| `member_guid` | String | The unique identifier for the member that has new or updated transaction data. Defined by MX. |
| `transactions_created_count` | Integer | The number of newly created transactions. |
| `transactions_updated_count` | Integer | The number of newly updated transactions. |
| `type` | String | The type of webhook being delivered. Possible values include `AGGREGATION`, `BALANCE`, `HISTORY`, and `STATEMENT`. |
| `user_guid` | String | The unique identifier for the user. Defined by MX. |
| `user_id` | String | The unique partner-defined identifier for the user. |

**Example Payload**

```json JSON theme={null}
{
  "action": "member_data_updated",
  "completed_at": 1531947410,
  "completed_on": "2018-07-18",
  "is_background": true,
  "job_guid": "JOB-823ab268-5107-4a67-97c8-60292572ac2e",
  "member_guid": "MBR-48d9a481-f2a2-7e13-2685-62869cf0d33a",
  "transactions_created_count": 3,
  "transactions_updated_count": 2,
  "type": "AGGREGATION",
  "user_guid": "USR-eaf4ac68-d17d-5e9b-7b46-959a5b315a9e",
  "user_id": "partner-defined-id"
}
```

## Analytics Events

| Field | Data Type | Definition |
| :- | :- | :- |
| `action` | String | A description of the type of action that was taken by the user. |
| `app_name` | String | The name of the user's application. |
| `app_version` | String | The version of the user's application. |
| `category` | String | A description of the feature the user interacted with. |
| `client_id` | String | The unique partner-defined identifier for the client. |
| `created_at` | Integer | The date and time when the event occurred. |
| `data_source` | String | The type of origination point for the event. Possible values include `web` for web applications or `app` for mobile applications. |
| `duration` | Integer | The duration of the event in milliseconds. |
| `host` | String | The host name of the server. |
| `interval` | Integer | The length of a timed event in milliseconds. |
| `name` | String | The name of the page for a pageview or the description of the action taken for an analytics event. |
| `path` | String | The relative URL path of the event. |
| `screen_resolution` | String | The resolution of the screen size in pixels. For example, 1200x1600. |
| `session_id` | String | The unique identifier of the session. |
| `type` | String | The type of analytics event. Possible values include `analyticsevent`, `pageview`, `screenview`, and `timedevent`. |
| `user_agent_string` (deprecated) | String | Text identifying the user's browser and operating system. Deprecated in favor of `user_agent`. |
| `user_agent` | String | Text identifying the user's browser and operating system. |
| `user_guid` | String | The unique identifier for the member. Defined by MX. |
| `user_id` | String | The unique partner-defined identifier for the user. |
| `user_ip_address` | String | The IP address of the user. |
| `value` | String | The value used by the user, if applicable. |
| `client_guid` | String | The unique identifier of the client. Defined by MX. |

**Example Payload**

```json JSON theme={null}
{
  "_json": [
    {
      "action": "click",
      "app_name": null,
      "app_version": "widgets-v2",
      "category": "MX - Connect Credentials",
      "client_id": "C-1234",
      "client_guid": "CLT-71f54gf5-2f89-bbc6-de7d-a31ef8c6abd6",
      "created_at": 1523397481,
      "data_source": "web",
      "duration": 0,
      "host": null,
      "interval": null,
      "name": "Submit Credentials",
      "path": null,
      "screen_resolution": null,
      "session_id": "ANS-66ea8d88-0606-9e61-1036-399f6cf301c3",
      "type": "analyticsevent",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36",
      "user_agent_string": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36",
      "user_id": "U-1234",
      "user_guid": "USR-4758d481-3e0a-aefd-5f09-03aaam347317a",
      "user_ip_address": "127.0.0.1",
      "value": null
    }
  ]
}
```
