> For the complete documentation index, see [llms.txt](https://doc.commandersact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.commandersact.com/features/destinations/destinations-catalog/appsflyer/appsflyer-pc-console-ctv-events-api.md).

# AppsFlyer PC/Console/CTV Events API

[Appsflyer](https://www.appsflyer.com/)'s platform is used by businesses to understand how users find and interact with their apps.\
Using this destination you can leverage [AppsFlyer PC/Console/CTV Events API](https://dev.appsflyer.com/hc/reference/pc-console-ctv-api-overview) to measure [first app opens](https://dev.appsflyer.com/hc/reference/post_first-open-app-platform-app-id) and [in-app events](https://dev.appsflyer.com/hc/reference/post_first-open-app-platform-app-id).

## Key features

The AppsFlyer PC/Console/CTV Events API destination provides the following key features:

* **Events structure**: our [Events reference](https://community.commandersact.com/platform-x/developers/tracking/events-reference) supports [AppsFlyer's event structure](https://dev.appsflyer.com/hc/reference/post_inapp-app-platform-app-id), meaning that your data is properly bridged to the expected fields in an optimized way.
* **Prebuilt mappings**: data mapping for event-based destinations happens automatically, which simplifies user inputs.
* **Custom events and properties**: you can freely push custom events and properties based on your specific needs.
* **Smart mapping**: data mapping can be readjusted using your datalayer defined fields.
* **Support for multi-item data**: information included in the [item](https://community.commandersact.com/platform-x/developers/tracking/events-reference#item) array is bridged to AppsFlyer.

## Destination setup

{% hint style="info" %}
Ensure your app is registered in [AppsFlyer](https://hq1.appsflyer.com/auth/login) under <mark style="color:blue;">`My Apps`</mark> .
{% endhint %}

### Configuration

<table><thead><tr><th width="300">Settings</th><th>Description</th></tr></thead><tbody><tr><td><code>Signature Secret Key</code></td><td><em><strong><code>Required</code></strong></em><br>The developer key as the signature secret key. You can find its value in the <a href="https://hq1.appsflyer.com/unified-ltv/dashboard">AppsFlyer's dashboard</a> under <mark style="color:blue;"><code>Settings</code></mark> → <mark style="color:blue;"><code>My Apps</code></mark> → click <mark style="color:blue;"><code>⋮</code></mark> next to your app → <mark style="color:blue;"><code>App settings</code></mark> → <mark style="color:blue;"><code>Dev key</code></mark> .</td></tr><tr><td><code>Application Id</code></td><td><em><strong><code>Required</code></strong></em><br>Your application identifier (app-id). You can find its value in the <a href="https://hq1.appsflyer.com/unified-ltv/dashboard">AppsFlyer's dashboard</a> under <mark style="color:blue;"><code>Settings</code></mark> → <mark style="color:blue;"><code>My Apps</code></mark> → mouse over just below your app name → click <mark style="color:blue;"><code>Copy app id</code></mark> .</td></tr><tr><td><code>Platform</code></td><td><em><strong><code>Required</code></strong></em><br>Select your platform of the measured app from the provided list: <mark style="color:blue;"><code>roku</code></mark> , <mark style="color:blue;"><code>smartcast</code></mark> , <mark style="color:blue;"><code>tizen</code></mark> , <mark style="color:blue;"><code>webos</code></mark> , <mark style="color:blue;"><code>playstation</code></mark> , <mark style="color:blue;"><code>vidaa</code></mark> , <mark style="color:blue;"><code>steam</code></mark> , <mark style="color:blue;"><code>quest</code></mark> , <mark style="color:blue;"><code>battlenet</code></mark> , <mark style="color:blue;"><code>epic</code></mark> , <mark style="color:blue;"><code>switch</code></mark> , <mark style="color:blue;"><code>xbox</code></mark> , <mark style="color:blue;"><code>nativepc</code></mark> and <mark style="color:blue;"><code>vega</code></mark> .</td></tr><tr><td><code>First Open Event Name</code></td><td><em><strong><code>Required see below</code></strong></em><br>The name of the event identifying app first opens. Default: <mark style="color:blue;"><code>first_open</code></mark> . This is required if your app does not integrate our <a href="https://doc.commandersact.com/features/sources/sources-catalog/mobile-app">mobile SDK</a>.</td></tr><tr><td><code>Device Id Mapping</code></td><td><em><strong><code>Required</code></strong></em><br>Map your device identifiers by selecting a <mark style="color:blue;"><code>type</code></mark> from the provided list, and a <mark style="color:blue;"><code>value</code></mark> . At least one entry is required.</td></tr><tr><td><code>Event Mapping</code></td><td>Change the standard mapping between AppsFlyer events and yours or add new mappings.</td></tr><tr><td><code>Param Mapping</code></td><td>Map your custom parameters by setting their field names in <code>AppsFlyer parameter</code> and adding the value in <code>Your value</code>.</td></tr></tbody></table>

## Quick reference

<table data-header-hidden="false" data-header-sticky><thead><tr><th>Commanders Act Events</th><th>AppsFlyer Events</th></tr></thead><tbody><tr><td><code>achievement_unlocked</code></td><td><code>af_achievement_unlocked</code></td></tr><tr><td><code>ad_click</code></td><td><code>af_ad_click</code></td></tr><tr><td><code>ad_view</code></td><td><code>af_ad_view</code></td></tr><tr><td><code>add_payment_info</code></td><td><code>af_add_payment_info</code></td></tr><tr><td><code>add_to_cart</code></td><td><code>af_add_to_cart</code></td></tr><tr><td><code>add_to_wishlist</code></td><td><code>af_add_to_wishlist</code></td></tr><tr><td><code>app_opened</code></td><td><code>af_app_opened</code></td></tr><tr><td><code>sign_up</code></td><td><code>af_complete_registration</code></td></tr><tr><td><code>view_item</code></td><td><code>af_content_view</code></td></tr><tr><td><code>begin_checkout</code></td><td><code>af_initiated_checkout</code></td></tr><tr><td><code>invite</code></td><td><code>af_invite</code></td></tr><tr><td><code>generate_lead</code></td><td><code>lead</code></td></tr><tr><td><code>level_achieved</code></td><td><code>af_level_achieved</code></td></tr><tr><td><code>view_item_list</code></td><td><code>af_list_view</code></td></tr><tr><td><code>login</code></td><td><code>af_login</code></td></tr><tr><td><code>notification_open</code></td><td><code>af_opened_from_push_notification</code></td></tr><tr><td><code>in_app_purchase</code><br><code>purchase</code></td><td><code>af_purchase</code></td></tr><tr><td><code>submit_rating</code><br><code>rate</code></td><td><code>af_rate</code></td></tr><tr><td><code>re_engage</code></td><td><code>af_re_engage</code></td></tr><tr><td><p><code>view_search_results</code></p><p><code>search</code></p></td><td><code>af_search</code></td></tr><tr><td><code>share</code></td><td><code>af_share</code></td></tr><tr><td><code>spend_virtual_currency</code></td><td><code>af_spent_credits</code></td></tr><tr><td><code>spent_credits</code></td><td><code>af_spent_credits</code></td></tr><tr><td><code>start_trial</code></td><td><code>af_start_trial</code></td></tr><tr><td><code>subscribe</code></td><td><code>af_subscribe</code></td></tr><tr><td><code>travel_booking</code></td><td><code>af_travel_booking</code></td></tr><tr><td><code>ecommerce_purchase</code></td><td><code>af_travel_booking</code></td></tr><tr><td><code>tutorial_complete</code></td><td><code>af_tutorial_completion</code></td></tr><tr><td><code>app_update</code><br><code>update</code></td><td><code>af_update</code></td></tr></tbody></table>

## Field mappings

{% hint style="info" %}
Properties can be remapped using our [Smart Mapping](https://doc.commandersact.com/features/destinations/advanced-mapping#smart-mapping) feature.
{% endhint %}

<table data-header-hidden="false" data-header-sticky data-full-width="true"><thead><tr><th width="240">Smart Mapping Fields</th><th width="435.6685580062747">Commanders Act Default Properties</th><th width="333.3314419937253">AppsFlyer Properties</th></tr></thead><tbody><tr><td><code>Device IP</code></td><td><code>context.device.ip</code></td><td><code>ip</code> <strong>[*]</strong></td></tr><tr><td><code>-</code></td><td><code>Device Id Mapping</code></td><td><code>device_ids</code> <strong>[*]</strong></td></tr><tr><td><code>Event Timestamp</code></td><td><code>context.event_timestamp</code></td><td><code>timestamp</code></td></tr><tr><td><code>Request Id</code></td><td><code>context.event_id</code></td><td><code>request_id</code></td></tr><tr><td><code>Device User Agent</code></td><td><code>context.device.user_agent</code></td><td><code>user_agent</code></td></tr><tr><td><code>Device OS Version</code></td><td><code>context.device.os.version</code></td><td><code>device_os_version</code></td></tr><tr><td><code>Device Model</code></td><td><code>context.device.model</code></td><td><code>device_model</code></td></tr><tr><td><code>Ad Tracking Enabled</code></td><td><code>context.device.ad_tracking_enabled</code></td><td><code>limit_ad_tracking</code></td></tr><tr><td><code>User Id</code></td><td><code>user.id</code></td><td><p><code>customer_user_id</code></p><p><code>af_customer_user_id</code></p></td></tr><tr><td><code>App Version</code></td><td><code>context.app.version</code></td><td><code>app_version</code></td></tr><tr><td><code>Sharing Filters</code></td><td><code>partners.appsflyer.sharing_filters</code></td><td><code>sharing_filter</code></td></tr><tr><td><code>-</code></td><td><code>event_name</code></td><td><code>event_name</code> <strong>[1][4]</strong></td></tr><tr><td><code>Value</code></td><td><code>value</code></td><td><code>af_revenue</code> <strong>[2][4]</strong></td></tr><tr><td><code>Currency</code></td><td><code>currency</code></td><td><code>af_currency</code> <strong>[2][4]</strong></td></tr><tr><td><code>Ad Type</code></td><td><code>ad_format</code></td><td><code>af_adrev_ad_type</code> <strong>[3][4]</strong></td></tr><tr><td><code>City Ride</code></td><td><code>partners.appsflyer.af_city</code></td><td><code>af_city</code> <strong>[3][4]</strong></td></tr><tr><td><code>Travel Class</code></td><td><code>partners.appsflyer.af_class</code></td><td><code>af_class</code> <strong>[3][4]</strong></td></tr><tr><td><code>Item Name</code></td><td><code>items.0.product.name</code></td><td><code>af_content</code> <strong>[3][4]</strong></td></tr><tr><td><code>Item Id</code></td><td><code>items.0.id</code></td><td><code>af_content_id</code> <strong>[3][4]</strong></td></tr><tr><td><code>Item Id</code></td><td><code>items.X.id</code></td><td><code>af_content_list</code> <strong>[3][4]</strong></td></tr><tr><td><code>Item List</code></td><td><code>items.length</code></td><td><code>af_quantity</code> <strong>[3][4]</strong></td></tr><tr><td><code>Item Category 1</code></td><td><code>items.0.product.category_1</code></td><td><code>af_content_type</code> <strong>[3][4]</strong></td></tr><tr><td><code>Country Ride</code></td><td><code>partners.appsflyer.af_country</code></td><td><code>af_country</code> <strong>[3][4]</strong></td></tr><tr><td><code>Currency</code></td><td><code>currency</code></td><td><code>af_currency</code> <strong>[3][4]</strong></td></tr><tr><td><code>Check-in date</code></td><td><code>partners.appsflyer.af_date_a</code></td><td><code>af_date_a</code> <strong>[3][4]</strong></td></tr><tr><td><code>Check-out date</code></td><td><code>partners.appsflyer.af_date_b</code></td><td><code>af_date_b</code> <strong>[3][4]</strong></td></tr><tr><td><code>Departing Arrival Date</code></td><td><code>partners.appsflyer.af_departing_arrival_date</code></td><td><code>af_departing_arrival_date</code> <strong>[3][4]</strong></td></tr><tr><td><code>Departing Departure Date</code></td><td><code>partners.appsflyer.af_departing_departure_date</code></td><td><code>af_departing_departure_date</code> <strong>[3][4]</strong></td></tr><tr><td><code>Returning Arrivial Date</code></td><td><code>partners.appsflyer.af_returning_arrival_date</code></td><td><code>af_returning_arrival_date</code> <strong>[3][4]</strong></td></tr><tr><td><code>Returning Departure Date</code></td><td><code>partners.appsflyer.af_returning_departure_date</code></td><td><code>af_returning_departure_date</code> <strong>[3][4]</strong></td></tr><tr><td><code>Description</code></td><td><code>partners.appsflyer.af_description</code></td><td><code>af_description</code> <strong>[3][4]</strong></td></tr><tr><td><code>First Destination</code></td><td><code>partners.appsflyer.af_dest_a</code></td><td><code>af_destination_a</code> <strong>[3][4]</strong></td></tr><tr><td><code>Second Destination</code></td><td><code>partners.appsflyer.af_dest_b</code></td><td><code>af_destination_b</code> <strong>[3][4]</strong></td></tr><tr><td><code>Destination List</code></td><td><code>partners.appsflyer.af_dest_list</code></td><td><code>af_destination_list</code> <strong>[3][4]</strong></td></tr><tr><td><code>Hotel Score</code></td><td><code>partners.appsflyer.af_hotel_score</code></td><td><code>af_hotel_score</code> <strong>[3][4]</strong></td></tr><tr><td><code>User Level</code></td><td><code>partners.appsflyer.af_level</code></td><td><code>af_level</code> <strong>[3][4]</strong></td></tr><tr><td><code>Max Rating Value</code></td><td><code>partners.appsflyer.af_max_rating_value</code></td><td><code>af_max_rating_value</code> <strong>[3][4]</strong></td></tr><tr><td><code>Adults Number</code></td><td><code>partners.appsflyer.af_num_adults</code></td><td><code>af_num_adults</code> <strong>[3][4]</strong></td></tr><tr><td><code>Childrens Number</code></td><td><code>partners.appsflyer.af_num_children</code></td><td><code>af_num_children</code> <strong>[3][4]</strong></td></tr><tr><td><code>Infants Number</code></td><td><code>partners.appsflyer.af_num_infants</code></td><td><code>af_num_infants</code> <strong>[3][4]</strong></td></tr><tr><td><code>Transaction Id</code></td><td><code>id</code></td><td><code>af_order_id</code> <strong>[3][4]</strong></td></tr><tr><td><code>Payment Method</code></td><td><code>payment_method</code></td><td><code>af_payment_info_available</code> <strong>[3][4]</strong></td></tr><tr><td><code>Hotel Area</code></td><td><code>partners.appsflyer.af_hotel_area</code></td><td><code>af_preferred_neighborhoods</code> <strong>[3][4]</strong></td></tr><tr><td><code>User Stops Number</code></td><td><code>partners.appsflyer.af_preferred_num_stops</code></td><td><code>af_preferred_num_stops</code> <strong>[3][4]</strong></td></tr><tr><td><code>Hotel Price Range</code></td><td><code>partners.appsflyer.af_preferred_price_range</code></td><td><code>af_preferred_price_range</code> <strong>[3][4]</strong></td></tr><tr><td><code>Hotel Star Rating</code></td><td><code>partners.appsflyer.af_preferred_star_ratings</code></td><td><code>af_preferred_star_ratings</code> <strong>[3][4]</strong></td></tr><tr><td><code>Projected Revenue</code></td><td><code>partners.appsflyer.af_projected_revenue</code></td><td><code>af_projected_revenue</code> <strong>[3][4]</strong></td></tr><tr><td><code>Max Rating Value</code></td><td><code>partners.appsflyer.af_max_rating_value</code></td><td><code>af_rating_value</code> <strong>[3][4]</strong></td></tr><tr><td><code>Receipt Id</code></td><td><code>partners.appsflyer.af_receipt_id</code></td><td><code>af_receipt_id</code> <strong>[3][4]</strong></td></tr><tr><td><code>Region Ride</code></td><td><code>partners.appsflyer.af_region</code></td><td><code>af_region</code> <strong>[3][4]</strong></td></tr><tr><td><code>Registration Method</code></td><td><code>method</code></td><td><code>af_registration_method</code> <strong>[3][4]</strong></td></tr><tr><td><code>Score</code></td><td><code>partners.appsflyer.score</code></td><td><code>af_score</code> <strong>[3][4]</strong></td></tr><tr><td><code>Search Term</code></td><td><code>search_term</code></td><td><code>af_search_string</code> <strong>[3][4]</strong></td></tr><tr><td><code>Subscription Id</code></td><td><code>partners.appsflyer.af_subscription_id</code></td><td><code>af_subscription_id</code> <strong>[3][4]</strong></td></tr><tr><td><code>Success</code></td><td><code>partners.appsflyer.af_success</code></td><td><code>af_success</code> <strong>[3][4]</strong></td></tr><tr><td><code>Suggested Destinations</code></td><td><code>partners.appsflyer.af_suggested_destinations</code></td><td><code>af_suggested_destinations</code> <strong>[3][4]</strong></td></tr><tr><td><code>Suggested Hotels</code></td><td><code>partners.appsflyer.af_suggested_hotels</code></td><td><code>af_suggested_hotels</code> <strong>[3][4]</strong></td></tr><tr><td><code>Travel End</code></td><td><code>partners.appsflyer.af_travel_end</code></td><td><code>af_travel_end</code> <strong>[3][4]</strong></td></tr><tr><td><code>Travel Start</code></td><td><code>partners.appsflyer.af_travel_start</code></td><td><code>af_travel_start</code> <strong>[3][4]</strong></td></tr><tr><td><code>User Score</code></td><td><code>partners.appsflyer.af_user_score</code></td><td><code>af_user_score</code> <strong>[3][4]</strong></td></tr><tr><td><code>Validated</code></td><td><code>partners.appsflyer.af_validated</code></td><td><code>af_validated</code> <strong>[3][4]</strong></td></tr><tr><td><code>Achievement Id</code></td><td><code>partners.appsflyer.af_achievement_id</code></td><td><code>af_achievement_id</code> <strong>[3][4]</strong></td></tr><tr><td><code>Coupon</code></td><td><code>partners.appsflyer.af_coupon_code</code></td><td><code>af_coupon_code</code> <strong>[3][4]</strong></td></tr><tr><td><code>Customer Segment</code></td><td><code>partners.appsflyer.af_customer_segment</code></td><td><code>af_customer_segment</code> <strong>[3][4]</strong></td></tr><tr><td><code>Deep Link</code></td><td><code>partners.appsflyer.af_deep_link</code></td><td><code>af_deep_link</code> <strong>[3][4]</strong></td></tr><tr><td><code>Event End</code></td><td><code>partners.appsflyer.af_event_end</code></td><td><code>af_event_end</code> <strong>[3][4]</strong></td></tr><tr><td><code>Event Start</code></td><td><code>partners.appsflyer.af_event_start</code></td><td><code>af_event_start</code> <strong>[3][4]</strong></td></tr><tr><td><code>Latitude</code></td><td><code>partners.appsflyer.af_lat</code></td><td><code>af_lat</code> <strong>[3][4]</strong></td></tr><tr><td><code>Longtitude</code></td><td><code>partners.appsflyer.af_long</code></td><td><code>af_long</code> <strong>[3][4]</strong></td></tr><tr><td><code>New Version</code></td><td><code>partners.appsflyer.af_new_version</code></td><td><code>af_new_version</code> <strong>[3][4]</strong></td></tr><tr><td><code>Old Version</code></td><td><code>partners.appsflyer.af_old_version</code></td><td><code>af_old_version</code> <strong>[3][4]</strong></td></tr><tr><td><code>Review Text</code></td><td><code>partners.appsflyer.af_review_text</code></td><td><code>af_review_text</code> <strong>[3][4]</strong></td></tr><tr><td><code>Tutorial Id</code></td><td><code>partners.appsflyer.af_tutorial_id</code></td><td><code>af_tutorial_id</code> <strong>[3][4]</strong></td></tr><tr><td><code>Virtual Currency Name</code></td><td><code>partners.appsflyer.af_virtual_currency_name</code></td><td><code>af_virtual_currency_name</code> <strong>[3][4]</strong></td></tr><tr><td><code>Duration Seconds</code></td><td><code>partners.appsflyer.af_duration_seconds</code></td><td><code>af_duration_seconds</code> <strong>[3][4]</strong></td></tr></tbody></table>

{% hint style="info" %}
**\*** Mandatory property.\
**1.** See [Quick reference](#quick-reference) for more details on the standard mapping.\
**2.** Set in the property `event_parameters` .\
**3.** Set in the property `event_custom_parameters` .\
**4.** This property is not present for first app opens.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.commandersact.com/features/destinations/destinations-catalog/appsflyer/appsflyer-pc-console-ctv-events-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
