Integration of Awin with BigQuery
Learn how to connect Awin to Google BigQuery using WitCloud. Automatically fetch campaign, transaction, and commission data, analyze it in real-time, and optimize your affiliate marketing efforts.
Updated
Introduction
This integration connects Awin to Google Cloud BigQuery. It collects your Awin transactions with their commission data, so you can analyze the results of your affiliate marketing next to the rest of your data in WitCloud.
Configuration guide
Follow the steps below to connect Awin with BigQuery. Once the setup is complete, your Awin data will be transferred to your BigQuery project.
Make sure you have admin access to your Awin account before starting the configuration.
Module setup
Go to Integrations in the menu and click Add integration.

Select Awin from the list of available integrations.

Enter the Collect name, e.g., "Awin PL".

Authorization
If you have previously authorized the Awin module and do not require additional permissions, you can skip this step and pick the existing authorization from the Select Awin authorization drop-down.
To connect to Awin you need to generate a token. Navigate to the API Credentials page by this link.
Fill in the password field and press the button Show my API tokens.
Copy the API token. You will need it to complete the configuration of the module in WitCloud.
Come back to WitCloud and click Authorize.

Paste the API token into the Access token field of the Authorize form and click Create.

Select the appropriate account from the Select account drop-down list.

Select your country code in the Region field.

Optionally, click Show advanced settings. Tables to collect lets you filter the tables you want to collect; by default all of them are selected, and at least one table is required.

Click Next.
Historical data and scheduling
In Historical Data, enter the number of days for which you want to fetch historical data. You can enter up to 365 days.

A data synchronization schedule will be created automatically. More information on this topic can be found here.
Click Create to complete the configuration.

Done! Your Awin data will now be synchronized with BigQuery.
Data schema
Expand the tables below to view the full data schema collected from Awin.
Data schema for awin_transactions
| Field Name | Mode | Type |
|---|---|---|
| id | NULLABLE | INTEGER |
| url | NULLABLE | STRING |
| advertiserId | NULLABLE | INTEGER |
| publisherId | NULLABLE | INTEGER |
| commissionSharingPublisherId | NULLABLE | STRING |
| commissionSharingSelectedRatePublisherId | NULLABLE | STRING |
| campaign | NULLABLE | STRING |
| siteName | NULLABLE | STRING |
| commissionStatus | NULLABLE | STRING |
| commissionAmount | NULLABLE | RECORD |
| ├─ commissionAmount.amount | NULLABLE | FLOAT |
| ├─ commissionAmount.currency | NULLABLE | STRING |
| saleAmount | NULLABLE | RECORD |
| ├─ saleAmount.amount | NULLABLE | FLOAT |
| ├─ saleAmount.currency | NULLABLE | STRING |
| ipHash | NULLABLE | STRING |
| customerCountry | NULLABLE | STRING |
| clickRefs | NULLABLE | RECORD |
| ├─ clickRefs.clickRef | NULLABLE | STRING |
| clickDate | NULLABLE | TIMESTAMP |
| transactionDate | NULLABLE | TIMESTAMP |
| validationDate | NULLABLE | STRING |
| type | NULLABLE | STRING |
| declineReason | NULLABLE | STRING |
| voucherCodeUsed | NULLABLE | BOOLEAN |
| voucherCode | NULLABLE | STRING |
| lapseTime | NULLABLE | INTEGER |
| amended | NULLABLE | BOOLEAN |
| amendReason | NULLABLE | STRING |
| oldSaleAmount | NULLABLE | STRING |
| oldCommissionAmount | NULLABLE | STRING |
| clickDevice | NULLABLE | STRING |
| transactionDevice | NULLABLE | STRING |
| publisherUrl | NULLABLE | STRING |
| advertiserCountry | NULLABLE | STRING |
| orderRef | NULLABLE | STRING |
| transactionParts | REPEATED | RECORD |
| ├─ transactionParts.commissionGroupId | NULLABLE | INTEGER |
| ├─ transactionParts.amount | NULLABLE | FLOAT |
| ├─ transactionParts.commissionAmount | NULLABLE | FLOAT |
| ├─ transactionParts.advertiserCost | NULLABLE | STRING |
| ├─ transactionParts.commissionGroupCode | NULLABLE | STRING |
| ├─ transactionParts.commissionGroupName | NULLABLE | STRING |
| ├─ transactionParts.trackedParts | REPEATED | RECORD |
| │ ├─ transactionParts.trackedParts.code | NULLABLE | STRING |
| │ ├─ transactionParts.trackedParts.amount | NULLABLE | FLOAT |
| │ ├─ transactionParts.trackedParts.currency | NULLABLE | STRING |
| paidToPublisher | NULLABLE | BOOLEAN |
| paymentId | NULLABLE | INTEGER |
| transactionQueryId | NULLABLE | INTEGER |
| originalSaleAmount | NULLABLE | STRING |
| advertiserCost | NULLABLE | RECORD |
| ├─ advertiserCost.amount | NULLABLE | STRING |
| ├─ advertiserCost.currency | NULLABLE | STRING |
| basketProducts | NULLABLE | STRING |
