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

# Awin

> Connect Awin to SegmentStream and import affiliate cost data.

## Before you begin

You must obtain an API token to provide access to Awin data.

<Steps>
  <Step title="Log in to Awin">
    Login to your [Awin control panel](https://ui.awin.com/login).
  </Step>

  <Step title="Navigate to API credentials">
    Go to the [API credentials section](https://ui.awin.com/awin-api).
  </Step>

  <Step title="Get your API token">
    Enter your account password into the box to display your API token.
  </Step>
</Steps>

## Getting started

<Steps>
  <Step title="Navigate to Data Sources">
    Inside the admin panel navigate to the **Data Sources** page and click **+ NEW** on the top right corner.
  </Step>

  <Step title="Select Awin">
    Choose **AWIN** from the list.
  </Step>

  <Step title="Enter API token">
    Paste the **API token** into the input field and click **Save**.
  </Step>

  <Step title="Configure settings">
    Select an **Account**, **Region**, **Time zone** and input the **AWIN commission %**.
  </Step>

  <Step title="Repeat for additional accounts">
    Repeat for all ad accounts whose cost data you would like to import.
  </Step>

  <Step title="Save">
    Click **Save**.
  </Step>
</Steps>

## UTM matching for campaigns

SegmentStream supports automatic UTM matching for Awin campaigns only when UTM parameters are defined inside the URL for each offer in your product feed. Otherwise, you will need to match Awin campaigns manually inside the SegmentStream admin panel.

By default, the following matching applies for `utm_source` and `utm_medium`:

* `utm_source` -- `AWIN`
* `utm_medium` -- `Publisher type`

This matching can be changed inside the admin panel by specifying appropriate values for the **UTM source**, **UTM medium mapping**, and **UTM campaign mapping** options.
