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

# Trigger Collection Points

The following methods are used to control when the Collection Point configuration is attached to the existing web form. Controlling the timing of when the configuration is loaded and attached (installed) is important as it is necessary for the web form elements to already exist on the page when the Collection Point configuration is installed.

### Register Event

This method can be used to control when the Collection Point is installed on the web form.

#### Example Code:

```javascript
OneTrust.Api.RegisterEvent("{Event type}");
```

#### With Command Queue:

```javascript
OtSdk('consent','RegisterEvent','external')
```

#### Event Types:

|                 |                                               |
| --------------- | --------------------------------------------- |
| `page-load`     | Configuration installed at page load          |
| `document-load` | Configuration installed when the DOM is ready |
| `external`      | Configuration is installed via ad-hoc method  |

### InstallCP

This method can be used to install the Collection Point to the web form via an adhoc method that can be called at any time.

Note: `callback function` is optional and it returns true or false.

*Example Code:*

```javascript
OneTrust.Api.InstallCP("{collection point id}", {callback function});
```

*With Command Queue:*

```javascript
OtSdk('consent','InstallCP','{collection point id}', {callback function})
```