# capacitor-plugin-segment-appsflyer

Integration appsflyer

## Install

```bash
npm install capacitor-plugin-segment-appsflyer
npx cap sync
```

## API

<docgen-index>

* [`echo(...)`](#echo)
* [`addListener('conversion_callback', ...)`](#addlistenerconversion_callback)
* [`addListener('oaoa_callback', ...)`](#addlisteneroaoa_callback)
* [`addListener('udl_callback', ...)`](#addlistenerudl_callback)
* [`initialize(...)`](#initialize)
* [`identify(...)`](#identify)
* [`track(...)`](#track)
* [`trackPage(...)`](#trackpage)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### echo(...)

```typescript
echo(options: { value: string; }) => Promise<{ value: string; }>
```

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ value: string; }</code> |

**Returns:** <code>Promise&lt;{ value: string; }&gt;</code>

--------------------


### addListener('conversion_callback', ...)

```typescript
addListener(eventName: 'conversion_callback', listenerFunc: (event: OnConversionDataResult) => void) => PluginListenerHandle
```

| Param              | Type                                                                                          |
| ------------------ | --------------------------------------------------------------------------------------------- |
| **`eventName`**    | <code>'conversion_callback'</code>                                                            |
| **`listenerFunc`** | <code>(event: <a href="#onconversiondataresult">OnConversionDataResult</a>) =&gt; void</code> |

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

--------------------


### addListener('oaoa_callback', ...)

```typescript
addListener(eventName: 'oaoa_callback', listenerFunc: (event: OnAppOpenAttribution) => void) => PluginListenerHandle
```

| Param              | Type                                                                                      |
| ------------------ | ----------------------------------------------------------------------------------------- |
| **`eventName`**    | <code>'oaoa_callback'</code>                                                              |
| **`listenerFunc`** | <code>(event: <a href="#onappopenattribution">OnAppOpenAttribution</a>) =&gt; void</code> |

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

--------------------


### addListener('udl_callback', ...)

```typescript
addListener(eventName: 'udl_callback', listenerFunc: (event: OnDeepLink) => void) => PluginListenerHandle
```

| Param              | Type                                                                  |
| ------------------ | --------------------------------------------------------------------- |
| **`eventName`**    | <code>'udl_callback'</code>                                           |
| **`listenerFunc`** | <code>(event: <a href="#ondeeplink">OnDeepLink</a>) =&gt; void</code> |

**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

--------------------


### initialize(...)

```typescript
initialize(options: { writeKey: string; isDebug?: boolean; waitForATTUserAuthorization?: number; trackLifecycleEvents?: boolean; }) => Promise<void>
```

| Param         | Type                                                                                                                        |
| ------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ writeKey: string; isDebug?: boolean; waitForATTUserAuthorization?: number; trackLifecycleEvents?: boolean; }</code> |

--------------------


### identify(...)

```typescript
identify(options: { userId: string; traits?: Record<string, unknown>; }) => Promise<void>
```

| Param         | Type                                                                                           |
| ------------- | ---------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ userId: string; traits?: <a href="#record">Record</a>&lt;string, unknown&gt;; }</code> |

--------------------


### track(...)

```typescript
track(options: { eventName: string; properties: Record<string, unknown>; }) => Promise<void>
```

| Param         | Type                                                                                                 |
| ------------- | ---------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ eventName: string; properties: <a href="#record">Record</a>&lt;string, unknown&gt;; }</code> |

--------------------


### trackPage(...)

```typescript
trackPage(options: { eventName: string; properties: Record<string, unknown>; }) => Promise<void>
```

| Param         | Type                                                                                                 |
| ------------- | ---------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ eventName: string; properties: <a href="#record">Record</a>&lt;string, unknown&gt;; }</code> |

--------------------


### Interfaces


#### PluginListenerHandle

| Prop         | Type                                      |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |


#### OnConversionDataResult

| Prop               | Type                |
| ------------------ | ------------------- |
| **`callbackName`** | <code>string</code> |
| **`errorMessage`** | <code>string</code> |
| **`data`**         | <code>any</code>    |


#### OnAppOpenAttribution

| Prop               | Type                |
| ------------------ | ------------------- |
| **`callbackName`** | <code>string</code> |
| **`errorMessage`** | <code>string</code> |
| **`data`**         | <code>any</code>    |


#### OnDeepLink

| Prop           | Type                |
| -------------- | ------------------- |
| **`status`**   | <code>string</code> |
| **`error`**    | <code>string</code> |
| **`deepLink`** | <code>any</code>    |


### Type Aliases


#### Record

Construct a type with a set of properties K of type T

<code>{
 [P in K]: T;
 }</code>

</docgen-api>
