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

# Metric Data Upload

<Info>
  **Note**

  The data upload feature is available only to Owner and In-house Marketer users. Agency and Media Partner users cannot access it.

  If the **\[Integrations]>\[DATA UPLOAD]** menu is not visible on your Airbridge dashboard, check your [app role](/en/guides/user-management#app-roles).
</Info>

You can upload metric data to Airbridge in a CSV file format to add data that is not collected by Airbridge via channel integration or tracking links.

The data can be uploaded on the **\[Integrations]>\[Self-serve Metric Data]** page. With the data, you can define the [self-serve metrics](/en/guides/creating-metrics#self-serve-metrics) that you can use in the Overview Dashboard, Acutals Report, and Trend Report.

Self-serve metric data upload is different from cost data upload. For cost data upload, refer to this [article](/en/guides/data-upload-ad-spend).

## **CSV File Preparation**

The metric data shall be uploaded in a CSV file format. Refer to the following sample CSV file.

* [Sample CSV file for metric data upload](https://static.airbridge.io/docs/airbridge_self_serve_metric_data_sample.csv)

### Data input rules

Make sure to abide by the following data input rules when preparing the CSV file to avoid errors.

* GroupBy data shall be input in the same way as displayed in Airbridge so that the data you upload can be aggregated along with the data collected via the SDK and tracking links. For example, if the CSV includes “Android,” the data won’t be aggregated as “android” data because Airbridge displays data as “android,” not “Android.”
* The maximum file size for CSV is 1MB with a limit of 10,000 rows.
* Make sure no blank fields are included. For string-type data, 1 to 256 characters are allowed.
* Only letters and numbers can be used in the event\_category field. Special characters () are not allowed.

Only designated row names shall be used. Make sure no spaces are included in the row names. No blank cells should be included. The data won’t be uploaded properly if there is a blank cell in the required rows. If there is no data to input, input 0 or none, depending on the data type of the required row.

<AccordionGroup>
  <Accordion title="Required rows">
    | Row name        | Date type | Description         | Example        | Row name available as               |
    | --------------- | --------- | ------------------- | -------------- | ----------------------------------- |
    | date            | string    | Date                | 2022-01-01     | GroupBy; `Event Date`               |
    | channel         | string    | Ad channel          | naver.searchad | GroupBy;<br />`Channel`             |
    | event\_category | string    | Event category name | Click-email    | Metric and GroupBy; `Category name` |
    | event\_value    | double    | Event value         | 10000          | Metric;<br />`Event Value (App)`    |

    **event\_category** is the name of the self-serve metric. The self-serve metrics can be searched by the event\_category name in the Actuals Report. Refer to this [article](/en/guides/creating-metrics#self-serve-metrics) to learn about self-serve metrics.

    If the date, channel, event\_category combination are the same, add the event\_value.

    Note that the channel field must be input with the [Airbridge dashboard display names](https://docs.google.com/spreadsheets/d/13ThNnryqRmZQwJVecM8lZ2OB7LzA8s3cwLlQBGpbXLg/edit#gid=1415221276\&range=B:B) so that the uploaded data can be aggregated along with the data Airbridge collects from the ad channels. The Airbridge dashboard display names of the ad channels can also be found on the **\[Integrations]>\[Ad Channel Integration]** page in grey.

    The date field must be input in the required format. For example, if `2022.01.02` is input in the date row, the data won't be uploaded properly. Make sure you don't enter commas in the event\_value row. Data upload may fail when commas are present.
  </Accordion>

  <Accordion title="Additional rows allowed">
    | Row name                          | Data type | Description                                                                                                                                                                                      | GroupBy                      |
    | --------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------- |
    | campaign                          | string    | Campaign name                                                                                                                                                                                    | Campaign                     |
    | ad\_group                         | string    | Ad group name                                                                                                                                                                                    | Ad Group                     |
    | ad\_creative                      | string    | Ad creative                                                                                                                                                                                      | Ad Creative                  |
    | content                           | string    | Ad content type                                                                                                                                                                                  | Content                      |
    | event\_source                     | string    | Data source<br />- app<br />- web<br />- tracking\_link                                                                                                                                          | Event Source                 |
    | os\_name                          | string    | Operating System                                                                                                                                                                                 | OS Name                      |
    | term                              | string    | Ad keyword                                                                                                                                                                                       | Term                         |
    | country                           | string    | 2-digit country code                                                                                                                                                                             | Country                      |
    | currency                          | string    | 3-digit currency code (ISO 4217)                                                                                                                                                                 | Currency                     |
    | sub\_publisher                    | string    | Sub publisher name                                                                                                                                                                               | Sub Publisher                |
    | sub\_sub\_publisher\_1            | string    | Sub-sub publisher 1 name                                                                                                                                                                         | Sub Sub Publisher 1          |
    | sub\_sub\_publisher\_2            | string    | Sub-sub publisher 2 name                                                                                                                                                                         | Sub Sub Publisher 2          |
    | sub\_sub\_publisher\_3            | string    | Sub-sub publisher 3 name                                                                                                                                                                         | Sub Sub Publisher 3          |
    | is\_first\_event\_per\_device\_id | boolean   | Whether the event is the first event that occurred on the device by [Airbridge Device ID](/en/guides/identifiers#airbridge-device-id)<br />- true: first event<br />- false: not the first event | Is First Event per Device ID |
    | is\_first\_event\_per\_user\_id   | boolean   | Whether the event is the first event that occurred on the device by User ID<br />- true: first event<br />- false: not the first event                                                           | Is First Event per User ID   |

    For rows such as **event\_source** and **os\_name**, data shall be input in the same way as displayed in Airbridge so that the data you upload can be aggregated along with the data collected via the SDK and tracking links. For example, if the CSV includes “Android,” the data won’t be aggregated as “android” data because Airbridge displays data as “android,” not “Android.”

    Airbridge supports the following 2-digit country codes:

    * kr, jp, us, ru, kz

    Airbridge supports the following OS platforms:

    * Windows, Ubuntu, Tizen, Other, Mac OS X, Linux, iOS, Chrome OS, Android

    Airbridge supports the following 3-digit currencies:

    * KRW, USD, EUR

    Don't enter `Web` in the **event\_sourc**e row. Only `web` is allowed.

    Either `TRUE`, `FALSE` or `true`, `false` is supported for the  **is\_first\_event\_per\_device\_id** and **is\_first\_event\_per\_user\_id** rows. Don't mix upper and lowercase letters (e.g., `True`, `False`) as it will lead to errors in data upload.
  </Accordion>
</AccordionGroup>

## **Uploading CSV File**

<Frame>
  <img src="https://mintcdn.com/airbridge-help-center/xwYukWBgLcUpDiQI/asset/image/metric-data-csv-upload-controls.png?fit=max&auto=format&n=xwYukWBgLcUpDiQI&q=85&s=b12be9d5715ee13afc8a6f34931f62a2" alt="01-en-Selfserve" width="1400" height="800" data-path="asset/image/metric-data-csv-upload-controls.png" />
</Frame>

1. Navigate to **\[Integrations]>\[Self-serve Metric Data]**, and click **CSV File Upload**.
2. Drag and drop the CSV file or select your file from the finder.
3. Make sure you dropped or selected the correct file and click **Upload**.
4. Data processing may take up to 10 minutes. After clicking **Confirm,** you can use other features of Airbridge.

### Upload status

The upload status can be found in the Status column. The upload status is updated automatically.

Refer to the table below for the status details.

| <span style={{ display: 'inline-block', minWidth: '200px' }}>Status</span> | Description                                                               |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| In progress                                                                | Your file is being uploaded to Airbridge. It may take up to 10 minutes.   |
| Failed                                                                     | Your file could not be uploaded. Click \[Action]>\[Details] to learn why. |
| Success                                                                    | Your file is successfully uploaded to Airbridge.                          |

### **Troubleshooting**

The majority of problems occur when the CSV file does not abide by the designated format or in the process of overwriting. Make sure your network connection status is working.

<AccordionGroup>
  <Accordion title="Error codes">
    The error code can be found by selecting \[Action]>\[View Details]. Refer to the table below to address errors.

    | Error code               | Description                                      | Solution                                                                                                                    |
    | ------------------------ | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
    | unknown field            | The row name is wrong or unsupported rows exist. | Make sure the file includes row names supported by Airbridge only.                                                          |
    | required field           | Required rows don't exist.                       | Make sure the file includes all required rows.                                                                              |
    | empty values not allowed | Blank fields exist in the required row.          | Make sure to fill in all required row fields. If there is no data to input, enter `0` or `none` depending on the data type. |
    | ‘OOO’ cannot be coerced  | Unsupported data type in the OOO row.            | Make sure to input data in the supported data type.                                                                         |
  </Accordion>

  <Accordion title="Overwriting data">
    The metric data you upload can overwrite the data uploaded before.
  </Accordion>
</AccordionGroup>

## Attention

<AccordionGroup>
  <Accordion title="Row names in the CSV file">
    Only designated row names are allowed in the CSV file. The row names are case-sensitive and space-sensitive.
  </Accordion>

  <Accordion title="Abiding by the file format">
    The data you input in the CSV file must be in the designated format. The required row fields shall not include blanks. If there is no data to input, enter `0` or `none,` depending on the data type.

    GroupBy data shall be input in the same way as displayed in Airbridge so that the data you upload can be aggregated along with the data collected via the SDK and tracking links. For example, if the CSV includes “Android,” the data won’t be aggregated as “android” data because Airbridge displays data as “android,” not “Android.”

    Also, make sure to input the currency row fields with 3-letter currency codes in capital letters. For example, if you input `usd` instead of `USD`, the data won't be uploaded properly.
  </Accordion>

  <Accordion title="Data overwriting">
    The last uploaded data overwrites the data uploaded before when there are overlapping data in the **date**, **channel**, and **event\_category** fields. Refer to the example below.

    ###### Example

    Let's say you have uploaded the following data as a CSV file.

    | date       | channel         | event\_category | event\_value |
    | ---------- | --------------- | --------------- | ------------ |
    | 2023-01-01 | Example-channel | click           | 100          |
    | 2023-01-02 | Example-channel | click           | 150          |
    | 2023-01-02 | Other           | click           | 200          |

    Later, you upload the following data.

    | date       | channel         | event\_category | event\_value |
    | ---------- | --------------- | --------------- | ------------ |
    | 2023-01-02 | Example-channel | click           | 200          |
    | 2023-01-02 | Other           | view            | 400          |
    | 2023-01-03 | Example-channel | click           | 300          |

    The data overlaps in **date**, **channel**, and **event\_category** fields. The data in the file uploaded later overwrites the data in the previously uploaded file. As a result, the event\_value (150) of the click on Example-channel for 2023-01-02 is replaced with the event\_value (200) of Example-channel for 2023-01-02.

    The data you can view in Airbridge after the second data upload is as follows.

    | date       | channel         | event\_category | event\_value |
    | ---------- | --------------- | --------------- | ------------ |
    | 2023-01-01 | Example-channel | click           | 100          |
    | 2023-01-02 | Example-channel | click           | 200          |
    | 2023-01-02 | Other           | click           | 200          |
    | 2023-01-02 | Other           | view            | 400          |
    | 2023-01-03 | Example-channel | click           | 300          |
  </Accordion>
</AccordionGroup>

<link rel="alternate" hrefLang="en" href="https://help.airbridge.io/en/guides/data-upload-metric-data" />

<link rel="alternate" hrefLang="ko" href="https://help.airbridge.io/ko/guides/data-upload-metric-data" />
