Cost operations

At a glance: Aggregating and viewing marketing cost data.

5793-images-for-KB-04__1_.jpg

Related articles: Cost aggregation overviewCost ETLAd Spend Ingestion

Cost aggregation

  • Xpend:
    • Acquires advertising cost data by API integration, ad spend ingestion (CSV file upload), and cost by click.
    • Supports various cost models used by the partner, for example, CPI, CPA, CPC, and CPM.
    • Cost data is available in AppsFlyer dashboards and cohort analytics, and by export to an S3 bucket (Cost ETL).
Cost aggregation method Cost models supported Data granularity Data freshness Remarks
API* All

Level depends on the integration

Several times a day, on average every four hours Data may change after the cost event as we try to receive data 7 days back. This enables us to take into account retroactive changes made by the ad network. 
Ad Spend Ingestion (file upload) All Level depends on the file uploaded  Up to 4 hours after ingestion Cost reported can be reverted and corrected data submitted for up to 90 days.
Clicks (attribution link) CPI User-level

Minimum: realtime

Maximum: Up to 4 hours after click

No change possible.
* The API connection to partners is by either Cost API or InCost API (never both). The API used and data granularity provided is partner-dependent.

Cost operations

This section discusses campaign cost operations.

Changing campaign names

AppsFlyer displays campaigns using the campaign ID as the key.

To avoid display anomalies ensure that:

  • Campaigns have a unique campaign ID assigned to them.
  • You don't use the same campaign name with different campaign IDs.  

Costs without installs

Why do I see cost data with no installs? This occurs when cost is provided at an upper-level hierarchy (e.g. campaign level), but the performance information (clicks and installs) is provided at a lower level in the advertising hierarchy (e.g. adset).

AppsFlyer completes the cost data for missing dimensions from an upper-level hierarchy. This guarantees a full view of the cost data at any level and minimizes internal discrepancies.

 Example

An advertiser runs a campaign. The advertising hierarchy is as follows:

  • Media source: media_eg
  • Campaign: campaign_eg 
  • Adsetsadest1, adset2

The following information relating to the media source is displayed.

Hierarchy: All Media Sources > media_eg

Campaign Cost Installs
campaign_eg $100 100
campaign_yy $200 1000
campaign_zz $300 2000

Drilling down into campaign_eg, the adset level is shown. 

Hierarchy: All Media Sources > media_eg > campaign_eg 

Adset Cost Installs
None $100  
adset_1 N/A 30
adset_2 N/A 70

In this case, the cost of campaign_eg is $100 and is provided at the campaign level. When drilling down to the adset level, which in this case is the component level, the cost cannot be broken down by adset. 

To overcome this, AppsFlyer carries down the cost from the campaign level and displays it in a separate row. In this case, the adset is shown as none and the installs field left blank

Cost API status

The operational status of cost integration is available as follows:

Cost Integrations Status dashboard

  • The Cost Integrations Status dashboard displays the current operational status of your partner integrations.
    • Advertisers see statuses for all apps and media sources in their account. 
    • Agencies see statuses for all apps and media sources that they work with.
  • Cost integrations are listed if the partner integration provided more than 100 installs in the past 28 days.
  • For integrations that require fixing, the action required is displayed. 
  • To view the Cost Integrations Status, in the AppsFlyer dashboard, go to Integration Cost Integrations Status.
  • See the table that follows for a breakdown of the dashboard components. 

Headline metrics

  • Total integrations: Number of apps/partners for which integration is enabled, irrespective of the status. For example, if you have an Android and iOS app, both integrated with Facebook, the total integrations is two.
  • Action required: Number of apps and media sources in your account with API issues that need updating. 
  • Warning: Number of integrations for which there is no data or that are experiencing a temporary network error.
  • Waiting for sync: Number of integrations that are connected but waiting for data to be pulled. It can take up to 4 hours to see the data in AppsFlyer.
  • Active: Number of partners with the cost API synced and operational.

Filters

  • App
  • Media source
  • Status
  • Integration type (cost)
  • Problem

Statuses

Each status has a separate table in the dashboard with all integrations that apply. For status definitions, see headline metrics above. 

  • Action required
  • Warning
  • Waiting for sync
  • Active

Columns

  • Media source
  • App: App with cost data API integration.
  • Last sync: The most recent time that data was received.
  • Integration type: Cost
  • Campaign cost (based on API): Campaign cost for the app per media source for the last 7 days.
  • Problem: See list that below.
  • Action: Action required to enable cost data, if the API integration has an issue. Clicking Reconnect leads to the required action.

Problems

  • Invalid credentialsAppsFlyer can't get data via the API because the credentials are not valid. Reconnect using the correct credentials.
  • Waiting for first sync: Waiting for initial data pull from partner. Check back again in 4 hours.
  • No data: Active integration, but partner is not returning data.
  • Network problem: There's a temporary problem with this partner. Check back again in 4 hours.
  • General error: There's a temporary problem with this partner. Contact support.
  • Old API version: Review integration and update API credentials.
  • Invalid configuration: Configured event name not found for attribution. Review configuration and update Event Source name.
  • Disabled integration: Reconnect your integration.


Integrated partner cost API status

The cost tab in the Integrated Partners section is relevant for ad networks that support getting cost data via API, and displays:

  • the status of your cost integration.
  • last time AppsFlyer successfully pulled matching cost data.

To view the individual partner cost integration status:

  1. In AppsFlyer, go to Configuration > Integrated Partners.
  2. Select the partner. 
  3. Go to the Cost tab.
    The status and last sync time displays.
Status Remarks/action required
Active Integration is enabled and successfully connected to the ad network.
Partner API is not returning matching cost data Connection is successful but the API has not returned any cost data matching AppsFlyer campaign attribution data.
Partner API is not responding
  • The integrated partner's server is not responding to AppsFlyer.
  • Wait 6 hours. If the status message persists, contact AppsFlyer support.
Invalid credentials
  • AppsFlyer can't get data via the API because the credentials are not valid.
  • Reconnect using the correct credentials.
Reach out to your ad network account manager to get access to their reporting API Work with the partner account manager to enable the cost integration in the partner's system.

Enable Cost API

The API connection to partners is by either Cost API or InCost API (never both). The API used and data granularity provided is partner-dependent. 

Look in the partner list to see if the partner you want to enable cost API for uses Cost API or InCost API.

Prerequisite:

AppsFlyer matches cost data to attribution data. As such, ensure that attribution links include the campaign ID (and ad set and ad IDs for partners that report with more granularity), without which we are unable to aggregate and report cost.

To enable Cost API:

  1. In the integrated partner Cost tab, enable Get Cost Data.
    The credentials required to connect to the partner display.
  2. Get the required credentials from the partner's dashboard or as directed in the AppsFlyer user interface.
  3. Complete the credential fields. 
  4. If the partner’s cost configuration has Site ID mapping, select the desired site ID configuration from the dropdown. 
  5. Click Save Cost.
  6. Click Test Connection.
    • The message API connection verified displays.
    •  The API is active. AppsFlyer collects data from the partner 6 times a day, on average once every four hours. 
    • Cost data sync status and messages

Enabling InCost API

To enable InCost API:

  • In the integrated partner Cost tab, enable Get Cost Data.

Disable Cost API

To disable Cost API: 

  1. Go to Integrated Partners and select the partner.
  2. Go to the Cost tab.
  3. Disable Get Cost Data 

Deleting connected accounts in the Cost tab

Connection to some integrated partners is achieved by logging into the partner from within AppsFlyer and connecting to the account.  You can delete the connection as needed. Once deleted, AppsFlyer is no longer able to pull cost data from the account. Deleting a connection does not impact historical data. 

To delete a connected account:

  1. In AppsFlyer, go to Configuration > Integrated Partners.
  2. Select the integrated partner, for example, Facebook.
  3. Go to the Cost tab.
    The list of connected accounts displays.
  4. In the actions column, hover over an account.
    The Delete connection option displays.
  5. Click Delete connection.
    A confirmation message displays.

    OauthDelete_en-us.png

  6. Click Delete.
    The account connection is deleted.
    The collection of cost data for the previously connected account stops immediately. There is no impact to historical data.  

Cost currency conversion

If the campaign cost currency provided by the ad network differs from that of the app-defined currency set on the platform, the cost is converted to the app-defined currency as follows:

  • AppsFlyer gets the rates from openexchangerates.org
  • Exchange rates are updated hourly
  • Currency conversions are performed using the last known rate
Was this article helpful?