Ad Spend Ingestion guide (open beta)

At a glance: Ad Spend Ingestion provides advertisers with 100% coverage of their spend reporting needs. Advertisers and ad networks can record the ad spend (cost) from media sources that don't report spend by API or click. 

 Watch Using Ad Spend Ingestion

Full Ad Spend data

Use Ad Spend Ingestion to record ad spend (cost) from media sources that don't report the spend by click or API. Doing so enables you to have a complete picture of your ad spend and ROI in the Dashboard. 

Ad spend can be recorded at the campaign level. This is done by using CSV files. The files are uploaded to the Dashboard and ingested. The updated aggregate ad spend displays in the Dashboard and aggregate data several minutes thereafter. 

Advertisers and ad networks can send and manage spend files. Agency support is on the roadmap. 

Previously ingested ad spend data can be overwritten if required.

Example use cases:

  • Record the spend incurred originating from networks that do not send spend data by API or attribution link
  • Offline channels, like radio campaigns and billboards
  • Influencers

To manage Ad Spend Ingestion go to Integration > Ad Spend Ingestion. Note: The Ad Spend Ingestion page is an account level page. This means you manage ingestions for all apps in the account using the same page. 

Preparing, uploading and ingesting ad spend files 

Use one of the following workflows to prepare, upload, and ingest your ad spend files. 

We recommend that initially, you use the file upload method. This is because error messages due to file format and content issues display immediately making it simpler for you to resolve issues.

Upload workflows 

Workflow: Upload file in the user interface
Step Description Link

Step for ad networks only: Before an ad network can send files, the advertiser needs to grant the ad networks permission

Grant spend ingestion permission

Prepare the CSV file 

CSV file format and schema

Upload and ingest the file in the user interface

Uploading ad spend files


On completion of the ingestion, use the interface to monitor the ingestion:

 Ad spend ingestion actions

Additional procedure: Overwrite previous ingestion

Overwrite previously ingested spend
Workflow: Upload file by email
Step Description Link

Prerequisite step for ad networks: Before an ad network can send files, the advertiser needs to grant them permission. 

Grant spend ingestion permission

Prerequisite: Get an ad spend token

Get an Ad Spend token

Prepare the CSV file

CSV file format and schema

Send the file by email 


5 Wait for an email status report from AppsFlyer detailing if the ingest was successful or if any issues were found.   
6  Use the interface to monitor the ingestion: Ad spend ingestion actions

Additional procedure: Overwrite previous ingestion

Overwrite previously ingested spend


CSV file format and schema

The ad spend CSV file format, schema, and validation rules are detailed here. If you use Excel or Google sheets to create the file, you must see Excel formatting instructions.


Don't use Excel or Google Sheets to either view or verify that CSV file is formatted correctly. Instead, use an editor

Content rules and schema of ad spend CSV files

File structure and content rules
Item Requirement

Media source

  • One media source per file
  • Multiple apps for the same media source are permitted
  • Limitations:
    • Don't send spend data from a media source that has an existing Cost API integration with AppsFlyer. Ingestion is not allowed from these sources. This includes Facebook Ads, Apple Search Ads, and Snapchat.
    • Don't send ad spend where the CPI is reported on the click attribution link. Doing so will result in duplicate spend reporting. (We expect this limitation to be temporary) 

App owner 

One advertiser (app owner) per file permitted. This means that multiple apps from the same advertiser are permitted. 

Filename extension

CSV Example: abc123.csv

File structure

  • Format: Files have a CSV format meaning that each column is separated by a comma. Note this is the way that Excel format CSV files by default. If Excel formats the file with a semi-colon this is related to the regional setting of your computer. 
  • Header row: The first row is a header row that matches the schema
  • Data rows: Contain the mandatory columns. Note: Ensure that there are no trailing blanks in your data. For example, [USD ] (a blank follows the D should be changed to [USD].
  • Blank rows: Not permitted
  • Duplicate rows having the same key: Not permitted. The key is derived from using the mandatory fields.
Ad Spend CSV schema

Column name 

(case sensitive)





  • The date the spend was incurred
  • Format:
    (Best practice) YYYY-MM-DD
  • Future dates not permitted
  • Note: Are you using Excel/Google sheets to prepare the file? Read this




  • App ID as it appears in the Dashboard.
  • Multiple apps are allowed in a single file
  • All apps need to belong to the same advertiser
  • id12356789


  • Media source as it appears in the Dashboard.
  • Only one media source per file permitted.



Campaign name. If the campaign name appears in the ad network, it should match (case sensitive) to the name as it appears in the ad network. 



  • Monetary spend
  • 5 digits allowed after the decimal point
  • The value 0 (zero) is permitted
  • Note:
    • The format "2,874.12" is not permitted.
    • Are you using Excel/Google sheets to prepare the file? Read this.





Two-letter country code compliant with ISO 3166
Note: Ensure that you send 2 characters with no blanks.




  • Three-letter currency code compliant with ISO 4217. Note: Ensure that you send 3 characters with no leading or trailing blanks.
  • One currency code per app in the file allowed. Different apps can have different currency codes. 


Optional. Will default to USD if left empty.

Getting an Ad Spend token

The Ad Spend token is used to verify that the email sender is authorized to submit the ad spend file. Advertiser and ad networks tokens are different. 


  • Advertisers do not share your token with ad networks.
  • The ad networks has their own unique token. 
  • Advertiser token:
    • The same token is valid for all apps in the account
    • Any team member can retrieve the Ad Spend token
  • Ad network token:
    • The same token is used for all advertisers
    • In addition, the advertiser needs to grant the ad network permission to submit ingestion files. 

To retrieve the ad spend token:

  1. In Appsflyer, Go to Integration > Ad Spend Ingestion. 
  2. In the upper right-hand of the page, click View Ad Spend token.
    The Ad Spend token is displayed. 
  3. Copy and save the Ad Spend token.

Granting an ad network spend ingestion permission

To grant the ad network Ad Spend Ingestion permission:

  1. In Appsflyer, the advertiser needs to go to Configuration > Integrated Partners. 
    The Integrated Partner page displays.
  2. Select the integrated partner.
  3. Go to the Permissions tab. 
  4. Enable Ad Network Permissions if it is not already so.
  5. (optional) Add team members.
  6. Enable Allow spend ingestion.

Sending ad spend files by email

Email prerequisites:

  • Advertisers: Ad Spend token is required.
  • Ad networks:
    • Ad spend token is required. 
    • The advertiser needs to grant the partner (ad network) ad spend ingestion permission 

To send the ad spend file by email:

  1. Complete the email address fields: 
    • To:
    • CC: Users who should get a copy of the automatic feedback
    • Subject: Paste the Ad Spend token in the subject field
    • Attachment: CSV file with the data.
  2. Send the email.
    • On completion of processing, a status email is sent that summarizes the upload and detailing issues or errors found during processing. The email is sent to all parties on the submission email and to the advertiser admin. Where errors are identified you should take corrective measures. 
    • You can view the status of files submitted in the Ad Spend Ingestion page

Uploading ad spend files

To upload the ad spend file:

  1. In AppsFlyer, go to  Integration > Ad Spend Ingestion.
    The Ad Spend Ingestion page displays. 
  2. Click + Ingest Ad spend file
    The Ingest Ad spend window opens.
  3. Drag the CSV file to the Ingest Ad spend file window.
    The Processing file message displays.
  4. If an error message displays during upload: rectify the error and repeat the relevant steps. 
  5. The Ad spend ingestion: file summary window opens.


  6. Do one of the following:
    • Abort the upload, click Cancel ingestion. 
    • Complete the ingestion process, click Ingest file.
      The message, All set! displays.
  7. Click Ingest another file or Done.

Managing Ad Spend Ingestions

On the Ad Spend Ingestion page, you can perform the following actions. 

  • Monitor the status of ingested files: To identify ingestion files that require your attention as the data may not have been ingested or was ingested partially. You may need to resubmit these files.
  • Monitor unmatched rows: The matched rows indicator displays the percentage of matched rows. If unmatched rows are unexpected, you should examine the data, by downloading the unmatched report to identify the root cause.
  • Download copies of CSV files submitted
  • Revert (cancel) the ingestion

Permission to view uploaded files and unmatched reports:

  • All team members can access the Ad Spend Ingestion page 
  • Access to detailed information is restricted to team members who have app permission.
  • If a file contains the data of multiple apps, the team member requires access to all the apps referenced in the file.

Ad Spend Ingestion actions

 To view the ingestion status at the file level:

    • Go to, Integration > Ad Spend Ingestion.
      The Ad Spend Ingestion page displays, the list of uploaded files displays.


    • If you have app permissions to all the apps contained in the file, use the Action command to:
      • Download CSV file: This a copy of the CSV file that was uploaded.
      • Download unmatched report for all apps in the file.

To view the ingestion status at the app-level:

  • Select the file.
    The app-level page displays. The list of apps in the ad spend file displays.


  • Perform file-level or app-level actions as described here.
  • File-level: If you have app permissions to all the apps contained in the file, you can use the controls in the upper-right right side of the page to: 
    • Revert (cancel) the Ad Spend Ingestion for all apps in the file. 
    • Download a copy of the CSV file that was submitted. 
  • App-level: If you have app permission for a specific app you can do so by using the Action command:
    • Download app data.
    • Download unmatched report for the app
    • Revert (cancel) the Ad Spend Ingestion for the selected app. 

Status indicators

Status Remarks
Applied Action completed successfully
Reverted Action completed successfully 
Error processing data

AppsFlyer system problem. Wait 10 minutes and try again. If it fails again contact AppsFlyer support.

No permissions

The token is not approved for this app.

  • Advertisers: check to that that app id is correct.
  • Partner: confirm with the advertiser that they have enabled allow spend ingestion in the integrated partners permission tab. 

Validation error



Row matching and the unmatched report

Row matching is the process where the ingestion mechanism matches the spend rows reported by ingestion with campaign performance rows already recorded in the Dashboard. This is done using the media source, campaign, date fields as a key. Note: Irrespective of the matching status the spend is recorded.

 Example: Matched and unmatched rows

Date Media source Campaign Impressions Clicks Cost Matching status
2019-01-01 example abc 5000 100 $1000 is-matching = TRUE
Performance information found
2019-01-02 example abc       is-matching = FALSE
No performance information on 2019-01-02
2019-01-02 example influencer     $2500

is-matching = FALSE
No performance information on 2019-01-02

The percentage of matched rows displays in the ingest page.

If unmatched rows are unexpected, download the unmatched report to investigate the cause. If necessary cancel the ingestion by reverting it.

The Unmatched report contains a column, is-matched which can have a value of TRUE (matched) or FALSE (unmatched) rows.

Ad Spend Ingestion page displaying the percentage of matched rows


Overwrite (correct) previously ingested spend

Previously ingested spend can be overwritten by using CSV files that contain data with the identical key of data previously ingested.

The key is formed from the date, media source, and campaign fields. If the keys match, data ingested last overwrites data previously ingested.

The following examples illustrate ad spend overwrite.

 Example: Ad spend overwrite

+ indicates the mandatory fields

Example A

Spend1.csv ingested on Monday
Date+ App ID+ Media Source+ Campaign+ Spend
2019-06-01 network_x campaign_a 100
Spend2.csv ingested on Tuesday
Date+ App ID+ Media Source+ Campaign+ Spend
2019-06-01 network_x campaign_a 200
The spend data from spend1.csv was overwritten by the spend data in spend2.csv. This is because spend2.csv was ingested last and the mandatory field which for the key are the same. 

Example B

Spend3.csv ingested on Monday
Date+ App ID+ Media Source+ Campaign+ Spend Geo
2019-05-01 network_x campaign_a 100 US
2019-05-01 network_x campaign_a 200 CN
Spend4.csv ingested on Tuesday
Date+ App ID+ Media Source+ Campaign+ Spend
2019-05-01 network_x campaign_a 50
The spend data from spend3.csv was overwritten by the spend data in spend4.csv. This is because spend4.csv was ingested last and the mandatory fields which form the key are the same. Note: Both spend3.csv rows are overwritten. 


Using Excel to format date and spend fields of CSV files

When using Excel/Google sheets to create a CSV file, the date and spend columns need to be formatted correctly before you save the file as a CSV file. Use the procedures here to format the date and spend fields correctly. 

After saving the CSV file, verify that the content is formatted correctly. Note: Don't use Excel to do the verification, rather use an editor

Formatting date cells in Excel

To format date cells in Excel with the format YYYY-MM-DD:

  1. Select the cells to be formatted.
  2. Right-click, select Format cells.
    The format cells window opens.


  3. Select Custom.
  4. In the Type field, enter YYYY-MM-DD
  5. Click OK.
    The date is formatted.

Formatting Spend cells in Excel

Excel usually formats value cells with a comma to separate the thousands as shown in the figure. This format is not suitable for ingestion. 


You can correct this by formatting the cells in Excel. 

To format the Spend amounts without a 1000 separator

  1. Select the cells to be formatted.
  2. Right-click, select Format cells.
    The format cells window opens.
  3. Select Number.


  1. Clear Use 1000 separator (,). 
  2. (Optional) Set the number of Decimal places. The default is 2. The maximum permitted is 5. 
  3. Click OK.
    The cells are formatted correctly.

Visual inspection of the CSV file without Excel

To examine the content of the CSV file use an editor to view the file. 

  • Windows: Notepad, Notepad++
  • macOS: TextEdit

The following contains a screenshot of the example CSV file displayed in an editor. 

Editor view


Using an editor examine the CSV file. Pay special attention to the following:

  • Blank spaces: Ensure that there are no leading or trailing blank spaces before or after the commas that separate the fields. In Excel, use the @trim command to remove blank spaces. 
  • Date: Ensure that the date field has the format YYYY-MM-DD. 
  • Spend: Ensure that there is no comma in the spend field.


CSV files generated by Excel don't have commas as delimiters

If Excel creates CSV file with a semi-colon ";" or other character as a delimiter but not a comma:

  • This occurs when your computer's regional settings are set to a language/region that is not English.
  • This issue is particularly prevalent when German is selected in the regional settings.
  • The solution differs depending on your computer operating system (macOS or Windows).
  • To resolve this issue, search for the latest guidance from Microsoft or other forums to revolve. Use the following search terms: Operating system (macOS or Windows) Excel change delimiter for CSV files.

Traits and limitations


Ad Spend Ingestion traits
Trait Ad Spend Ingestion supports Remarks 
Ad networks    
Agencies x  
Agency transparency x  
App-specific time zone  
App-specific currency  Spend is converted to the app-specific currency 
Size limitations N/A  
Organic data  
Non-organic data  
Data freshness Ad spend  
Historical data N/A


Team member access  


Not applicable

Was this article helpful?