Integration of WP Ads with BigQuery
Connect WP Ads to Google BigQuery with WitCloud and collect daily campaign statistics (costs, clicks, views, transactions and income) for analysis.
Updated
Introduction
This module connects to the WP Ads advertising platform (Wirtualna Polska) and copies your campaign statistics into Google Cloud BigQuery. For every campaign you get its dates and status, and for every day the costs, clicks, views, transactions and income. Use it to compare WP Ads with your other advertising channels and to follow the cost and results of your campaigns over time.
Configuration guide
Follow the steps below to connect WP Ads with BigQuery. Once the setup is complete, your campaign statistics are transferred to your BigQuery project automatically.
You need an API key from your WP Ads account before you start. The key is created in the WP Ads panel, which WitCloud does not control.
Module setup
Go to Integrations in the menu and click Add integration.

Select WP Ads from the list of available integrations.

Enter the Collect name, e.g., "WP Ads Collect".

Authorization
If you have already authorized WP Ads in WitCloud, pick that authorization from the Select WP Ads authorization drop-down and skip the steps below.
Click Authorize next to the Select WP Ads authorization field.

Paste the API key from your WP Ads account into the API Key field and click Create. WitCloud checks the key with WP Ads; if it is not accepted you see an error and nothing is saved. The new authorization is selected for you.

Advanced settings
Click Show advanced settings to see Tables to collect. WP Ads has one table, campaigns, and it is selected by default.

Click Next.
Historical data and scheduling
In Historical Data enter the number of days to fetch for the first import, up to 365.

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 WP Ads campaign statistics will now be synchronized with BigQuery.
Data schema
The integration writes one table, wp_ads_campaigns, with one row per campaign and a nested stats record for each day. Expand the table below to view its full schema.
Data schema for wp_ads_campaigns
| Field Name | Mode | Type |
|---|---|---|
| pixelId | NULLABLE | STRING |
| campaignId | NULLABLE | INTEGER |
| campaignName | NULLABLE | STRING |
| startDate | NULLABLE | TIMESTAMP |
| endDate | NULLABLE | TIMESTAMP |
| status | NULLABLE | STRING |
| stats | REPEATED | RECORD |
| stats.date | NULLABLE | DATETIME |
| stats.income | NULLABLE | NUMERIC |
| stats.clicks | NULLABLE | NUMERIC |
| stats.transactions | NULLABLE | INTEGER |
| stats.costs | NULLABLE | FLOAT |
| stats.vimp | NULLABLE | INTEGER |
| stats.views | NULLABLE | INTEGER |
| stats.delivery | NULLABLE | INTEGER |
| stats.open | NULLABLE | INTEGER |
