From e67c31ea4c99ddd7f732609496b6b8554dcf3c0e Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Mon, 29 May 2023 18:08:00 +0200 Subject: [PATCH 1/7] Source Facebook Marketing: Add Ad Insights streams --- .../ads_insights_configured_catalog.json | 232 ++++++++++++++++++ .../source_facebook_marketing/source.py | 26 ++ .../streams/__init__.py | 26 ++ .../streams/streams.py | 61 +++++ .../sources/facebook-marketing.md | 37 ++- 5 files changed, 378 insertions(+), 4 deletions(-) create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/integration_tests/ads_insights_configured_catalog.json diff --git a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/ads_insights_configured_catalog.json b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/ads_insights_configured_catalog.json new file mode 100644 index 0000000000000..0470b5dba4148 --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/ads_insights_configured_catalog.json @@ -0,0 +1,232 @@ +{ + "streams": [ + { + "stream": { + "name": "ads_insights_action_carousel_card", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_action_conversion_device", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_action_product_id", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_action_reaction", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_action_video_sound", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_action_video_type", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_action_type", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_delivery_device", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_delivery_platform", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_delivery_platform_and_device_platform", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_demographics_age", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_demographics_age_and_gender", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_demographics_country", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_demographics_dma_region", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_demographics_gender", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_dma", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_country", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_platform_and_device", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "ads_insights_region", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh", + "incremental" + ] + }, + "sync_mode": "incremental", + "destination_sync_mode": "append" + } + ] +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/source.py b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/source.py index c4d8c4cd7e5ad..3e89bd06f11a4 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/source.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/source.py @@ -28,6 +28,19 @@ AdsInsightsDma, AdsInsightsPlatformAndDevice, AdsInsightsRegion, + AdsInsightsActionCarouselCard, + AdsInsightsActionConversionDevice, + AdsInsightsActionProductID, + AdsInsightsActionReaction, + AdsInsightsActionVideoSound, + AdsInsightsActionVideoType, + AdsInsightsDeliveryDevice, + AdsInsightsDeliveryPlatform, + AdsInsightsDeliveryPlatformAndDevicePlatform, + AdsInsightsDemographicsAge, + AdsInsightsDemographicsCountry, + AdsInsightsDemographicsDMARegion, + AdsInsightsDemographicsGender, Campaigns, CustomConversions, Images, @@ -124,6 +137,19 @@ def streams(self, config: Mapping[str, Any]) -> List[Type[Stream]]: AdsInsightsDma(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), AdsInsightsPlatformAndDevice(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), AdsInsightsActionType(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsActionCarouselCard(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsActionConversionDevice(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsActionProductID(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsActionReaction(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsActionVideoSound(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsActionVideoType(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsDeliveryDevice(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsDeliveryPlatform(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsDeliveryPlatformAndDevicePlatform(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsDemographicsAge(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsDemographicsCountry(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsDemographicsDMARegion(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), + AdsInsightsDemographicsGender(page_size=config.page_size, max_batch_size=config.max_batch_size, **insights_args), Campaigns( api=api, start_date=config.start_date, diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/__init__.py b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/__init__.py index 7a78222356954..eb855e1bb9aee 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/__init__.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/__init__.py @@ -15,6 +15,19 @@ AdsInsightsDma, AdsInsightsPlatformAndDevice, AdsInsightsRegion, + AdsInsightsActionCarouselCard, + AdsInsightsActionConversionDevice, + AdsInsightsActionProductID, + AdsInsightsActionReaction, + AdsInsightsActionVideoSound, + AdsInsightsActionVideoType, + AdsInsightsDeliveryDevice, + AdsInsightsDeliveryPlatform, + AdsInsightsDeliveryPlatformAndDevicePlatform, + AdsInsightsDemographicsAge, + AdsInsightsDemographicsCountry, + AdsInsightsDemographicsDMARegion, + AdsInsightsDemographicsGender, Campaigns, CustomConversions, Images, @@ -33,6 +46,19 @@ "AdsInsightsDma", "AdsInsightsPlatformAndDevice", "AdsInsightsRegion", + "AdsInsightsActionCarouselCard", + "AdsInsightsActionConversionDevice", + "AdsInsightsActionProductID", + "AdsInsightsActionReaction", + "AdsInsightsActionVideoSound", + "AdsInsightsActionVideoType", + "AdsInsightsDeliveryDevice", + "AdsInsightsDeliveryPlatform", + "AdsInsightsDeliveryPlatformAndDevicePlatform", + "AdsInsightsDemographicsAge", + "AdsInsightsDemographicsCountry", + "AdsInsightsDemographicsDMARegion", + "AdsInsightsDemographicsGender", "Campaigns", "CustomConversions", "Images", diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/streams.py b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/streams.py index b5cdb050a15e2..8a35199f83878 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/streams.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/streams.py @@ -228,3 +228,64 @@ class AdsInsightsPlatformAndDevice(AdsInsights): class AdsInsightsActionType(AdsInsights): breakdowns = [] action_breakdowns = ["action_type"] + + +class AdsInsightsActionCarouselCard(AdsInsights): + action_breakdowns = ["action_carousel_card_id", "action_carousel_card_name"] + + +class AdsInsightsActionConversionDevice(AdsInsights): + breakdowns = ["device_platform"] + action_breakdowns = ["action_type"] + + +class AdsInsightsActionProductID(AdsInsights): + breakdowns = ["product_id"] + action_breakdowns = [] + + +class AdsInsightsActionReaction(AdsInsights): + action_breakdowns = ["action_reaction"] + + +class AdsInsightsActionVideoSound(AdsInsights): + action_breakdowns = ["action_video_sound"] + + +class AdsInsightsActionVideoType(AdsInsights): + action_breakdowns = ["action_video_type"] + + +class AdsInsightsDeliveryDevice(AdsInsights): + breakdowns = ["device_platform"] + action_breakdowns = ["action_type"] + + +class AdsInsightsDeliveryPlatform(AdsInsights): + breakdowns = ["publisher_platform"] + action_breakdowns = ["action_type"] + + +class AdsInsightsDeliveryPlatformAndDevicePlatform(AdsInsights): + breakdowns = ["publisher_platform", "device_platform"] + action_breakdowns = ["action_type"] + + +class AdsInsightsDemographicsAge(AdsInsights): + breakdowns = ["age"] + action_breakdowns = ["action_type"] + + +class AdsInsightsDemographicsCountry(AdsInsights): + breakdowns = ["country"] + action_breakdowns = ["action_type"] + + +class AdsInsightsDemographicsDMARegion(AdsInsights): + breakdowns = ["dma"] + action_breakdowns = ["action_type"] + + +class AdsInsightsDemographicsGender(AdsInsights): + breakdowns = ["gender"] + action_breakdowns = ["action_type"] diff --git a/docs/integrations/sources/facebook-marketing.md b/docs/integrations/sources/facebook-marketing.md index 3bb093942e8e7..8ff9793ae5a29 100644 --- a/docs/integrations/sources/facebook-marketing.md +++ b/docs/integrations/sources/facebook-marketing.md @@ -93,9 +93,7 @@ The Facebook Marketing source connector supports the following sync modes: * [Incremental Sync - Append](https://docs.airbyte.com/understanding-airbyte/connections/incremental-append) (except for the AdCreatives and AdAccount tables) * [Incremental Sync - Deduped History](https://docs.airbyte.com/understanding-airbyte/connections/incremental-deduped-history) (except for the AdCreatives and AdAccount tables) -## Supported tables - -You can replicate the following tables using the Facebook Marketing connector: +## Supported Streams * [Activities](https://developers.facebook.com/docs/marketing-api/reference/ad-activity) * [AdAccount](https://developers.facebook.com/docs/marketing-api/business-asset-management/guides/ad-accounts) @@ -108,6 +106,32 @@ You can replicate the following tables using the Facebook Marketing connector: * [Images](https://developers.facebook.com/docs/marketing-api/reference/ad-image) * [Videos](https://developers.facebook.com/docs/marketing-api/reference/video) +Airbyte also supports the following Prebuilt Facebook AdInsights Reports: + +| Stream | Breakdowns | Action Breakdowns | +|:--------------------------------------------------|:--------------------------------------------------------------:|:-------------------------------------------------------:| +| Ad Insights Action Carousel Card | --- | `action_carousel_card_id`, `action_carousel_card_name` | +| Ad Insights Action Conversion Device | `device_platform` | `action_type` | +| Ad Insights Action Product ID | `product_id` | --- | +| Ad Insights Action Reaction | --- | `action_reaction` | +| Ad Insights Action Video Sound | --- | `action_video_sound` | +| Ad Insights Action Video Type | --- | `action_video_type` | +| Ad Insights Action Type | --- | `action_type` | +| Ad Insights Delivery Device | `device_platform` | `action_type` | +| Ad Insights Delivery Platform | `publisher_platform` | `action_type` | +| Ad Insights Delivery Platform And Device Platform | `publisher_platform`, `device_platform` | `action_type` | +| Ad Insights Demographics Age | `age` | `action_type` | +| Ad Insights Demographics Age And Gender | `age`, `gender` | `action_type`, `action_target_id`, `action_destination` | +| Ad Insights Demographics Country | `country` | `action_type` | +| Ad Insights Demographics DMA Region | `dma` | `action_type` | +| Ad Insights Demographics Gender | `gender` | `action_type` | +| Ad Insights DMA | `dma` | `action_type`, `action_target_id`, `action_destination` | +| Ad Insights Country | `country` | `action_type`, `action_target_id`, `action_destination` | +| Ad Insights Platform And Device | `publisher_platform`, `platform_position`, `impression_device` | `action_type` | +| Ad Insights Region | `region` | `action_type`, `action_target_id`, `action_destination` | + + + You can segment the AdInsights table into parts based on the following information. Each part will be synced as a separate table if normalization is enabled: * Country @@ -117,16 +141,21 @@ You can segment the AdInsights table into parts based on the following informati * Region For more information, see the [Facebook Insights API documentation.](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights/) + +:::note + Pay attention, that not all fields (e.g. conversions, conversion_values) will be returned for AdInsights, see [docs](https://developers.facebook.com/docs/marketing-api/reference/ads-action-stats/). To get all fields You should use custom insights with **breakdowns**. +::: + ## Facebook Marketing Attribution Reporting Please be informed that the connector uses the `lookback_window` parameter to perform the repetitive read of the last `` days in the Incremental sync mode. This means some data will be synced twice (or possibly more often) despite the cursor value being up-to-date. You can change this date window by modifying the `lookback_window` parameter when setting up the source. The smaller the value - the fewer duplicates you will have. The greater the value - the more precise results you will get. More details on what the attribution window is and what purpose it serves can be found in this [Facebook Article](https://www.facebook.com/business/help/458681590974355?id=768381033531365). ## Data type mapping | Integration Type | Airbyte Type | -| :--------------: | :----------: | +|:----------------:|:------------:| | string | string | | number | number | | array | array | From 4f58417ae151de0dd208d3624665bfbb362f69da Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Mon, 29 May 2023 18:09:27 +0200 Subject: [PATCH 2/7] Source Facebook Marketing: update docs; bump version --- .../connectors/source-facebook-marketing/Dockerfile | 2 +- .../connectors/source-facebook-marketing/metadata.yaml | 2 +- docs/integrations/sources/facebook-marketing.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile b/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile index 5b530661db3b4..e9f97da7fab14 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile +++ b/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile @@ -13,5 +13,5 @@ ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.3.7 +LABEL io.airbyte.version=0.4.0 LABEL io.airbyte.name=airbyte/source-facebook-marketing diff --git a/airbyte-integrations/connectors/source-facebook-marketing/metadata.yaml b/airbyte-integrations/connectors/source-facebook-marketing/metadata.yaml index b3b6ab79290d2..4023b30f9940c 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/metadata.yaml +++ b/airbyte-integrations/connectors/source-facebook-marketing/metadata.yaml @@ -5,7 +5,7 @@ data: connectorSubtype: api connectorType: source definitionId: e7778cfc-e97c-4458-9ecb-b4f2bba8946c - dockerImageTag: 0.3.7 + dockerImageTag: 0.4.0 dockerRepository: airbyte/source-facebook-marketing githubIssueLabel: source-facebook-marketing icon: facebook.svg diff --git a/docs/integrations/sources/facebook-marketing.md b/docs/integrations/sources/facebook-marketing.md index 8ff9793ae5a29..354f8d504a873 100644 --- a/docs/integrations/sources/facebook-marketing.md +++ b/docs/integrations/sources/facebook-marketing.md @@ -165,6 +165,7 @@ Please be informed that the connector uses the `lookback_window` parameter to pe | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 0.4.0 | 2023-05-29 | [26720](https://github.com/airbytehq/airbyte/pull/26720) | Add Prebuilt Ad Insights reports | | 0.3.7 | 2023-05-12 | [26000](https://github.com/airbytehq/airbyte/pull/26000) | Handle config errors | | 0.3.6 | 2023-04-27 | [22999](https://github.com/airbytehq/airbyte/pull/22999) | Specified date formatting in specification | | 0.3.5 | 2023-04-26 | [24994](https://github.com/airbytehq/airbyte/pull/24994) | Emit stream status messages | From 572d1c56146a8e56b74b001e31bd69debca2d5aa Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Mon, 29 May 2023 18:36:33 +0200 Subject: [PATCH 3/7] Source Facebook Marketing: update tests config --- .../acceptance-test-config.yml | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/acceptance-test-config.yml b/airbyte-integrations/connectors/source-facebook-marketing/acceptance-test-config.yml index 9afe32f885317..4a78994529c68 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-facebook-marketing/acceptance-test-config.yml @@ -27,14 +27,44 @@ acceptance_tests: bypass_reason: "Thumbnail urls changes permanently" - name: "ad_creatives" bypass_reason: "Thumbnail urls changes permanently" - - name: "ads_insights_age_and_gender" + - name: "ads_insights_action_carousel_card" bypass_reason: "Data not permanent" - - name: "ads_insights_region" + - name: "ads_insights_action_conversion_device" + bypass_reason: "Data not permanent" + - name: "ads_insights_action_product_id" + bypass_reason: "Data not permanent" + - name: "ads_insights_action_reaction" + bypass_reason: "Data not permanent" + - name: "ads_insights_action_video_sound" + bypass_reason: "Data not permanent" + - name: "ads_insights_action_video_type" + bypass_reason: "Data not permanent" + - name: "ads_insights_action_type" + bypass_reason: "Data not permanent" + - name: "ads_insights_delivery_device" + bypass_reason: "Data not permanent" + - name: "ads_insights_delivery_platform" + bypass_reason: "Data not permanent" + - name: "ads_insights_delivery_platform_and_device_platform" + bypass_reason: "Data not permanent" + - name: "ads_insights_demographics_age" + bypass_reason: "Data not permanent" + - name: "ads_insights_demographics_age_and_gender" + bypass_reason: "Data not permanent" + - name: "ads_insights_demographics_country" + bypass_reason: "Data not permanent" + - name: "ads_insights_demographics_dma_region" + bypass_reason: "Data not permanent" + - name: "ads_insights_demographics_gender" bypass_reason: "Data not permanent" - name: "ads_insights_dma" bypass_reason: "Data not permanent" + - name: "ads_insights_country" + bypass_reason: "Data not permanent" - name: "ads_insights_platform_and_device" bypass_reason: "Data not permanent" + - name: "ads_insights_region" + bypass_reason: "Data not permanent" - name: "activities" bypass_reason: "age field autoupdated" - name: "custom_conversions" From 284b9b77b6acbc7ef15c143ba5d2e43d1a6598e0 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Mon, 29 May 2023 19:47:02 +0200 Subject: [PATCH 4/7] Source Facebook Marketing: fix unit test --- .../source-facebook-marketing/unit_tests/test_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_source.py b/airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_source.py index bf1ca12227186..1b7e472f4f03a 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_source.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_source.py @@ -97,7 +97,7 @@ def test_check_connection_exception(self, api, config, logger_mock): def test_streams(self, config, api): streams = SourceFacebookMarketing().streams(config) - assert len(streams) == 16 + assert len(streams) == 29 def test_spec(self): spec = SourceFacebookMarketing().spec() From 5fcd2866c7e9467317aac66d768bbf577e51b8d0 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Mon, 29 May 2023 21:29:43 +0200 Subject: [PATCH 5/7] Source Facebook Marketing: typo fix --- .../source-facebook-marketing/acceptance-test-config.yml | 2 +- .../integration_tests/ads_insights_configured_catalog.json | 2 +- docs/integrations/sources/facebook-marketing.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/acceptance-test-config.yml b/airbyte-integrations/connectors/source-facebook-marketing/acceptance-test-config.yml index 4a78994529c68..b7abd3868bbe3 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-facebook-marketing/acceptance-test-config.yml @@ -49,7 +49,7 @@ acceptance_tests: bypass_reason: "Data not permanent" - name: "ads_insights_demographics_age" bypass_reason: "Data not permanent" - - name: "ads_insights_demographics_age_and_gender" + - name: "ads_insights_age_and_gender" bypass_reason: "Data not permanent" - name: "ads_insights_demographics_country" bypass_reason: "Data not permanent" diff --git a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/ads_insights_configured_catalog.json b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/ads_insights_configured_catalog.json index 0470b5dba4148..5946b803ea73b 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/ads_insights_configured_catalog.json +++ b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/ads_insights_configured_catalog.json @@ -134,7 +134,7 @@ }, { "stream": { - "name": "ads_insights_demographics_age_and_gender", + "name": "ads_insights_age_and_gender", "json_schema": {}, "supported_sync_modes": [ "full_refresh", diff --git a/docs/integrations/sources/facebook-marketing.md b/docs/integrations/sources/facebook-marketing.md index 354f8d504a873..031971b8cd115 100644 --- a/docs/integrations/sources/facebook-marketing.md +++ b/docs/integrations/sources/facebook-marketing.md @@ -117,11 +117,11 @@ Airbyte also supports the following Prebuilt Facebook AdInsights Reports: | Ad Insights Action Video Sound | --- | `action_video_sound` | | Ad Insights Action Video Type | --- | `action_video_type` | | Ad Insights Action Type | --- | `action_type` | +| Ad Insights Age And Gender | `age`, `gender` | `action_type`, `action_target_id`, `action_destination` | | Ad Insights Delivery Device | `device_platform` | `action_type` | | Ad Insights Delivery Platform | `publisher_platform` | `action_type` | | Ad Insights Delivery Platform And Device Platform | `publisher_platform`, `device_platform` | `action_type` | | Ad Insights Demographics Age | `age` | `action_type` | -| Ad Insights Demographics Age And Gender | `age`, `gender` | `action_type`, `action_target_id`, `action_destination` | | Ad Insights Demographics Country | `country` | `action_type` | | Ad Insights Demographics DMA Region | `dma` | `action_type` | | Ad Insights Demographics Gender | `gender` | `action_type` | From a1818450d86af8f07fd290e908d9a89e3473fa64 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Tue, 30 May 2023 14:21:23 +0200 Subject: [PATCH 6/7] Source Facebook Marketing: update future_state --- .../integration_tests/future_state.json | 221 ++++++++++++++++-- 1 file changed, 204 insertions(+), 17 deletions(-) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/future_state.json b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/future_state.json index c57f2c3ab904a..cb9b927b0a632 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/future_state.json +++ b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/future_state.json @@ -6,7 +6,9 @@ "event_time": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "activities" } + "stream_descriptor": { + "name": "activities" + } } }, { @@ -16,7 +18,9 @@ "updated_time": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "campaigns" } + "stream_descriptor": { + "name": "campaigns" + } } }, { @@ -26,17 +30,21 @@ "updated_time": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "images" } + "stream_descriptor": { + "name": "images" + } } }, - { + { "type": "STREAM", "stream": { "stream_state": { "updated_time": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "videos" } + "stream_descriptor": { + "name": "videos" + } } }, { @@ -46,7 +54,9 @@ "updated_time": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ad_creatives" } + "stream_descriptor": { + "name": "ad_creatives" + } } }, { @@ -56,7 +66,9 @@ "updated_time": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ad_sets" } + "stream_descriptor": { + "name": "ad_sets" + } } }, { @@ -66,7 +78,166 @@ "updated_time": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ads" } + "stream_descriptor": { + "name": "ads" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_age_and_gender" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_country" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_dma" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_platform_and_device" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_region" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_action_type" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "custommy_custom_insights" + } + } + }, + + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_action_carousel_card" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_action_conversion_device" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_action_product_id" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_action_reaction" + } + } + }, + { + "type": "STREAM", + "stream": { + "stream_state": { + "date_start": "2121-07-25T13:34:26Z", + "include_deleted": true + }, + "stream_descriptor": { + "name": "ads_insights_action_video_sound" + } } }, { @@ -76,7 +247,9 @@ "date_start": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ads_insights" } + "stream_descriptor": { + "name": "ads_insights_action_video_type" + } } }, { @@ -86,7 +259,9 @@ "date_start": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ads_insights_age_and_gender" } + "stream_descriptor": { + "name": "ads_insights_delivery_device" + } } }, { @@ -96,7 +271,9 @@ "date_start": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ads_insights_country" } + "stream_descriptor": { + "name": "ads_insights_delivery_platform" + } } }, { @@ -106,7 +283,9 @@ "date_start": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ads_insights_dma" } + "stream_descriptor": { + "name": "ads_insights_delivery_platform_and_device_platform" + } } }, { @@ -116,7 +295,9 @@ "date_start": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ads_insights_platform_and_device" } + "stream_descriptor": { + "name": "ads_insights_demographics_age" + } } }, { @@ -126,7 +307,9 @@ "date_start": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ads_insights_region" } + "stream_descriptor": { + "name": "ads_insights_demographics_country" + } } }, { @@ -136,7 +319,9 @@ "date_start": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "ads_insights_action_type" } + "stream_descriptor": { + "name": "ads_insights_demographics_dma_region" + } } }, { @@ -146,7 +331,9 @@ "date_start": "2121-07-25T13:34:26Z", "include_deleted": true }, - "stream_descriptor": { "name": "custommy_custom_insights" } + "stream_descriptor": { + "name": "ads_insights_demographics_gender" + } } } -] +] \ No newline at end of file From 37a8bed90ec1d2c94b86cc73e10353f0cbaf4b7d Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Tue, 30 May 2023 14:37:31 +0200 Subject: [PATCH 7/7] Source Facebook Marketing: fix expected records --- .../integration_tests/expected_records.jsonl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/expected_records.jsonl b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/expected_records.jsonl index 9a45ac9fd903a..3a40dd4637bda 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/expected_records.jsonl +++ b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/expected_records.jsonl @@ -10,16 +10,6 @@ {"stream": "ads_insights", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "ad_id": "23846784938030398", "ad_name": "Stock photo ad 2", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 1, "conversion_rate_ranking": "UNKNOWN", "cost_per_estimated_ad_recallers": 0.008889, "cost_per_unique_click": 0.8, "cpc": 0.8, "cpm": 1.255887, "cpp": 1.296596, "created_time": "2021-02-11", "ctr": 0.156986, "date_start": "2021-02-14", "date_stop": "2021-02-14", "engagement_rate_ranking": "UNKNOWN", "estimated_ad_recall_rate": 14.58671, "estimated_ad_recallers": 90.0, "frequency": 1.032415, "impressions": 637, "inline_link_clicks": 0, "inline_post_engagement": 0, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "quality_ranking": "UNKNOWN", "reach": 617, "social_spend": 0.0, "spend": 0.8, "unique_clicks": 1, "unique_ctr": 0.162075, "unique_inline_link_clicks": 0, "unique_link_clicks_ctr": 0.0, "updated_time": "2021-08-27", "website_purchase_roas": [{"value": 0.0}], "wish_bid": 0.0}, "emitted_at": 1682686056980} {"stream": "ads_insights", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "actions": [{"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "link_click", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "page_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "post_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}], "ad_id": "23846765228310398", "ad_name": "Airbyte Ad", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 3, "conversion_rate_ranking": "UNKNOWN", "cost_per_estimated_ad_recallers": 0.007, "cost_per_inline_link_click": 0.396667, "cost_per_inline_post_engagement": 0.396667, "cost_per_unique_click": 0.396667, "cost_per_unique_inline_link_click": 0.396667, "cpc": 0.396667, "cpm": 0.902199, "cpp": 0.948207, "created_time": "2021-02-09", "ctr": 0.227445, "date_start": "2021-02-15", "date_stop": "2021-02-15", "engagement_rate_ranking": "UNKNOWN", "estimated_ad_recall_rate": 13.545817, "estimated_ad_recallers": 170.0, "frequency": 1.050996, "impressions": 1319, "inline_link_click_ctr": 0.227445, "inline_link_clicks": 3, "inline_post_engagement": 3, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "outbound_clicks": [{"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "outbound_click", "value": 3.0}], "quality_ranking": "UNKNOWN", "reach": 1255, "social_spend": 0.0, "spend": 1.19, "unique_actions": [{"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "link_click", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "page_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "post_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}], "unique_clicks": 3, "unique_ctr": 0.239044, "unique_inline_link_click_ctr": 0.239044, "unique_inline_link_clicks": 3, "unique_link_clicks_ctr": 0.239044, "unique_outbound_clicks": [{"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "outbound_click", "value": 3.0}], "updated_time": "2021-08-27", "website_ctr": [{"action_type": "link_click", "value": 0.227445}], "website_purchase_roas": [{"value": 0.0}], "wish_bid": 0.0}, "emitted_at": 1682686057366} {"stream": "ads_insights", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "ad_id": "23846784938030398", "ad_name": "Stock photo ad 2", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 0, "conversion_rate_ranking": "UNKNOWN", "cost_per_estimated_ad_recallers": 0.0085, "cpm": 1.177285, "cpp": 1.233672, "created_time": "2021-02-11", "ctr": 0.0, "date_start": "2021-02-15", "date_stop": "2021-02-15", "engagement_rate_ranking": "UNKNOWN", "estimated_ad_recall_rate": 14.513788, "estimated_ad_recallers": 100.0, "frequency": 1.047896, "impressions": 722, "inline_link_clicks": 0, "inline_post_engagement": 0, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "quality_ranking": "UNKNOWN", "reach": 689, "social_spend": 0.0, "spend": 0.85, "unique_clicks": 0, "unique_ctr": 0.0, "unique_inline_link_clicks": 0, "unique_link_clicks_ctr": 0.0, "updated_time": "2021-08-27", "website_purchase_roas": [{"value": 0.0}], "wish_bid": 0.0}, "emitted_at": 1682686057381} -{"stream": "ads_insights_country", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "actions": [{"action_destination": "243077367363346", "action_target_id": "243077367363346", "action_type": "link_click", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}, {"action_destination": "243077367363346", "action_target_id": "243077367363346", "action_type": "page_engagement", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}, {"action_destination": "243077367363346", "action_target_id": "243077367363346", "action_type": "post_engagement", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}], "ad_id": "23846784938030398", "ad_name": "Stock photo ad 2", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 2, "cost_per_estimated_ad_recallers": 0.011286, "cost_per_inline_link_click": 0.395, "cost_per_inline_post_engagement": 0.395, "cost_per_unique_click": 0.395, "cost_per_unique_inline_link_click": 0.395, "cpc": 0.395, "cpm": 1.519231, "cpp": 1.592742, "created_time": "2021-02-11", "ctr": 0.384615, "date_start": "2021-02-13", "date_stop": "2021-02-13", "estimated_ad_recall_rate": 14.112903, "estimated_ad_recallers": 70.0, "frequency": 1.048387, "impressions": 520, "inline_link_click_ctr": 0.384615, "inline_link_clicks": 2, "inline_post_engagement": 2, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "outbound_clicks": [{"action_destination": "243077367363346", "action_target_id": "243077367363346", "action_type": "outbound_click", "value": 2.0}], "reach": 496, "spend": 0.79, "unique_actions": [{"action_destination": "243077367363346", "action_target_id": "243077367363346", "action_type": "link_click", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}, {"action_destination": "243077367363346", "action_target_id": "243077367363346", "action_type": "page_engagement", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}, {"action_destination": "243077367363346", "action_target_id": "243077367363346", "action_type": "post_engagement", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}], "unique_clicks": 2, "unique_ctr": 0.403226, "unique_inline_link_click_ctr": 0.403226, "unique_inline_link_clicks": 2, "unique_link_clicks_ctr": 0.403226, "unique_outbound_clicks": [{"action_destination": "243077367363346", "action_target_id": "243077367363346", "action_type": "outbound_click", "value": 2.0}], "updated_time": "2021-08-27", "website_ctr": [{"action_type": "link_click", "value": 0.384615}], "website_purchase_roas": [{"value": 0.0}], "country": "US"}, "emitted_at": 1682686065138} -{"stream": "ads_insights_country", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "actions": [{"action_destination": "241903844147365", "action_target_id": "241903844147365", "action_type": "link_click", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}, {"action_destination": "241903844147365", "action_target_id": "241903844147365", "action_type": "page_engagement", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}, {"action_destination": "241903844147365", "action_target_id": "241903844147365", "action_type": "post_engagement", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}], "ad_id": "23846765228310398", "ad_name": "Airbyte Ad", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 1, "cost_per_estimated_ad_recallers": 0.009538, "cost_per_inline_link_click": 1.24, "cost_per_inline_post_engagement": 1.24, "cost_per_unique_click": 1.24, "cost_per_unique_inline_link_click": 1.24, "cpc": 1.24, "cpm": 1.27572, "cpp": 1.341991, "created_time": "2021-02-09", "ctr": 0.102881, "date_start": "2021-02-14", "date_stop": "2021-02-14", "estimated_ad_recall_rate": 14.069264, "estimated_ad_recallers": 130.0, "frequency": 1.051948, "impressions": 972, "inline_link_click_ctr": 0.102881, "inline_link_clicks": 1, "inline_post_engagement": 1, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "outbound_clicks": [{"action_destination": "241903844147365", "action_target_id": "241903844147365", "action_type": "outbound_click", "value": 1.0}], "reach": 924, "spend": 1.24, "unique_actions": [{"action_destination": "241903844147365", "action_target_id": "241903844147365", "action_type": "link_click", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}, {"action_destination": "241903844147365", "action_target_id": "241903844147365", "action_type": "page_engagement", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}, {"action_destination": "241903844147365", "action_target_id": "241903844147365", "action_type": "post_engagement", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}], "unique_clicks": 1, "unique_ctr": 0.108225, "unique_inline_link_click_ctr": 0.108225, "unique_inline_link_clicks": 1, "unique_link_clicks_ctr": 0.108225, "unique_outbound_clicks": [{"action_destination": "241903844147365", "action_target_id": "241903844147365", "action_type": "outbound_click", "value": 1.0}], "updated_time": "2021-08-27", "website_ctr": [{"action_type": "link_click", "value": 0.102881}], "website_purchase_roas": [{"value": 0.0}], "country": "US"}, "emitted_at": 1682686065554} -{"stream": "ads_insights_country", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "ad_id": "23846784938030398", "ad_name": "Stock photo ad 2", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 1, "cost_per_estimated_ad_recallers": 0.008889, "cost_per_unique_click": 0.8, "cpc": 0.8, "cpm": 1.255887, "cpp": 1.296596, "created_time": "2021-02-11", "ctr": 0.156986, "date_start": "2021-02-14", "date_stop": "2021-02-14", "estimated_ad_recall_rate": 14.58671, "estimated_ad_recallers": 90.0, "frequency": 1.032415, "impressions": 637, "inline_link_clicks": 0, "inline_post_engagement": 0, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "reach": 617, "spend": 0.8, "unique_clicks": 1, "unique_ctr": 0.162075, "unique_inline_link_clicks": 0, "unique_link_clicks_ctr": 0.0, "updated_time": "2021-08-27", "website_purchase_roas": [{"value": 0.0}], "country": "US"}, "emitted_at": 1682686065569} -{"stream": "ads_insights_country", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "actions": [{"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "link_click", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "page_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "post_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}], "ad_id": "23846765228310398", "ad_name": "Airbyte Ad", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 3, "cost_per_estimated_ad_recallers": 0.007, "cost_per_inline_link_click": 0.396667, "cost_per_inline_post_engagement": 0.396667, "cost_per_unique_click": 0.396667, "cost_per_unique_inline_link_click": 0.396667, "cpc": 0.396667, "cpm": 0.902199, "cpp": 0.948207, "created_time": "2021-02-09", "ctr": 0.227445, "date_start": "2021-02-15", "date_stop": "2021-02-15", "estimated_ad_recall_rate": 13.545817, "estimated_ad_recallers": 170.0, "frequency": 1.050996, "impressions": 1319, "inline_link_click_ctr": 0.227445, "inline_link_clicks": 3, "inline_post_engagement": 3, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "outbound_clicks": [{"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "outbound_click", "value": 3.0}], "reach": 1255, "spend": 1.19, "unique_actions": [{"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "link_click", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "page_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "post_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}], "unique_clicks": 3, "unique_ctr": 0.239044, "unique_inline_link_click_ctr": 0.239044, "unique_inline_link_clicks": 3, "unique_link_clicks_ctr": 0.239044, "unique_outbound_clicks": [{"action_destination": "244953057175777", "action_target_id": "244953057175777", "action_type": "outbound_click", "value": 3.0}], "updated_time": "2021-08-27", "website_ctr": [{"action_type": "link_click", "value": 0.227445}], "website_purchase_roas": [{"value": 0.0}], "country": "US"}, "emitted_at": 1682686096435} -{"stream": "ads_insights_country", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "ad_id": "23846784938030398", "ad_name": "Stock photo ad 2", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 0, "cost_per_estimated_ad_recallers": 0.0085, "cpm": 1.177285, "cpp": 1.233672, "created_time": "2021-02-11", "ctr": 0.0, "date_start": "2021-02-15", "date_stop": "2021-02-15", "estimated_ad_recall_rate": 14.513788, "estimated_ad_recallers": 100.0, "frequency": 1.047896, "impressions": 722, "inline_link_clicks": 0, "inline_post_engagement": 0, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "reach": 689, "spend": 0.85, "unique_clicks": 0, "unique_ctr": 0.0, "unique_inline_link_clicks": 0, "unique_link_clicks_ctr": 0.0, "updated_time": "2021-08-27", "website_purchase_roas": [{"value": 0.0}], "country": "US"}, "emitted_at": 1682686096451} -{"stream": "ads_insights_action_type", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "actions": [{"action_type": "link_click", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}, {"action_type": "post_engagement", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}, {"action_type": "page_engagement", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}], "ad_id": "23846784938030398", "ad_name": "Stock photo ad 2", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 2, "conversion_rate_ranking": "UNKNOWN", "cost_per_action_type": [{"action_type": "link_click", "value": 0.395, "1d_click": 0.395, "7d_click": 0.395, "28d_click": 0.395}, {"action_type": "post_engagement", "value": 0.395, "1d_click": 0.395, "7d_click": 0.395, "28d_click": 0.395}, {"action_type": "page_engagement", "value": 0.395, "1d_click": 0.395, "7d_click": 0.395, "28d_click": 0.395}], "cost_per_estimated_ad_recallers": 0.011286, "cost_per_inline_link_click": 0.395, "cost_per_inline_post_engagement": 0.395, "cost_per_outbound_click": [{"action_type": "outbound_click", "value": 0.395}], "cost_per_unique_action_type": [{"action_type": "link_click", "value": 0.395, "1d_click": 0.395, "7d_click": 0.395, "28d_click": 0.395}, {"action_type": "post_engagement", "value": 0.395, "1d_click": 0.395, "7d_click": 0.395, "28d_click": 0.395}, {"action_type": "page_engagement", "value": 0.395, "1d_click": 0.395, "7d_click": 0.395, "28d_click": 0.395}], "cost_per_unique_click": 0.395, "cost_per_unique_inline_link_click": 0.395, "cost_per_unique_outbound_click": [{"action_type": "outbound_click", "value": 0.395}], "cpc": 0.395, "cpm": 1.519231, "cpp": 1.592742, "created_time": "2021-02-11", "ctr": 0.384615, "date_start": "2021-02-13", "date_stop": "2021-02-13", "engagement_rate_ranking": "UNKNOWN", "estimated_ad_recall_rate": 14.112903, "estimated_ad_recallers": 70.0, "frequency": 1.048387, "impressions": 520, "inline_link_click_ctr": 0.384615, "inline_link_clicks": 2, "inline_post_engagement": 2, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "outbound_clicks": [{"action_type": "outbound_click", "value": 2.0}], "outbound_clicks_ctr": [{"action_type": "outbound_click", "value": 0.384615}], "quality_ranking": "UNKNOWN", "reach": 496, "social_spend": 0.0, "spend": 0.79, "unique_actions": [{"action_type": "link_click", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}, {"action_type": "post_engagement", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}, {"action_type": "page_engagement", "value": 2.0, "1d_click": 2.0, "7d_click": 2.0, "28d_click": 2.0}], "unique_clicks": 2, "unique_ctr": 0.403226, "unique_inline_link_click_ctr": 0.403226, "unique_inline_link_clicks": 2, "unique_link_clicks_ctr": 0.403226, "unique_outbound_clicks": [{"action_type": "outbound_click", "value": 2.0}], "unique_outbound_clicks_ctr": [{"action_type": "outbound_click", "value": 0.403226}], "updated_time": "2021-08-27", "website_ctr": [{"action_type": "link_click", "value": 0.384615}], "website_purchase_roas": [{"value": 0.0}], "wish_bid": 0.0}, "emitted_at": 1682686104783} -{"stream": "ads_insights_action_type", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "actions": [{"action_type": "link_click", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}, {"action_type": "page_engagement", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}, {"action_type": "post_engagement", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}], "ad_id": "23846765228310398", "ad_name": "Airbyte Ad", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 1, "conversion_rate_ranking": "UNKNOWN", "cost_per_action_type": [{"action_type": "link_click", "value": 1.24, "1d_click": 1.24, "7d_click": 1.24, "28d_click": 1.24}, {"action_type": "page_engagement", "value": 1.24, "1d_click": 1.24, "7d_click": 1.24, "28d_click": 1.24}, {"action_type": "post_engagement", "value": 1.24, "1d_click": 1.24, "7d_click": 1.24, "28d_click": 1.24}], "cost_per_estimated_ad_recallers": 0.009538, "cost_per_inline_link_click": 1.24, "cost_per_inline_post_engagement": 1.24, "cost_per_outbound_click": [{"action_type": "outbound_click", "value": 1.24}], "cost_per_unique_action_type": [{"action_type": "link_click", "value": 1.24, "1d_click": 1.24, "7d_click": 1.24, "28d_click": 1.24}, {"action_type": "page_engagement", "value": 1.24, "1d_click": 1.24, "7d_click": 1.24, "28d_click": 1.24}, {"action_type": "post_engagement", "value": 1.24, "1d_click": 1.24, "7d_click": 1.24, "28d_click": 1.24}], "cost_per_unique_click": 1.24, "cost_per_unique_inline_link_click": 1.24, "cost_per_unique_outbound_click": [{"action_type": "outbound_click", "value": 1.24}], "cpc": 1.24, "cpm": 1.27572, "cpp": 1.341991, "created_time": "2021-02-09", "ctr": 0.102881, "date_start": "2021-02-14", "date_stop": "2021-02-14", "engagement_rate_ranking": "UNKNOWN", "estimated_ad_recall_rate": 14.069264, "estimated_ad_recallers": 130.0, "frequency": 1.051948, "impressions": 972, "inline_link_click_ctr": 0.102881, "inline_link_clicks": 1, "inline_post_engagement": 1, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "outbound_clicks": [{"action_type": "outbound_click", "value": 1.0}], "outbound_clicks_ctr": [{"action_type": "outbound_click", "value": 0.102881}], "quality_ranking": "UNKNOWN", "reach": 924, "social_spend": 0.0, "spend": 1.24, "unique_actions": [{"action_type": "link_click", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}, {"action_type": "page_engagement", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}, {"action_type": "post_engagement", "value": 1.0, "1d_click": 1.0, "7d_click": 1.0, "28d_click": 1.0}], "unique_clicks": 1, "unique_ctr": 0.108225, "unique_inline_link_click_ctr": 0.108225, "unique_inline_link_clicks": 1, "unique_link_clicks_ctr": 0.108225, "unique_outbound_clicks": [{"action_type": "outbound_click", "value": 1.0}], "unique_outbound_clicks_ctr": [{"action_type": "outbound_click", "value": 0.108225}], "updated_time": "2021-08-27", "website_ctr": [{"action_type": "link_click", "value": 0.102881}], "website_purchase_roas": [{"value": 0.0}], "wish_bid": 0.0}, "emitted_at": 1682686105443} -{"stream": "ads_insights_action_type", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "ad_id": "23846784938030398", "ad_name": "Stock photo ad 2", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 1, "conversion_rate_ranking": "UNKNOWN", "cost_per_estimated_ad_recallers": 0.008889, "cost_per_unique_click": 0.8, "cpc": 0.8, "cpm": 1.255887, "cpp": 1.296596, "created_time": "2021-02-11", "ctr": 0.156986, "date_start": "2021-02-14", "date_stop": "2021-02-14", "engagement_rate_ranking": "UNKNOWN", "estimated_ad_recall_rate": 14.58671, "estimated_ad_recallers": 90.0, "frequency": 1.032415, "impressions": 637, "inline_link_clicks": 0, "inline_post_engagement": 0, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "outbound_clicks_ctr": [{"value": 0.0}], "quality_ranking": "UNKNOWN", "reach": 617, "social_spend": 0.0, "spend": 0.8, "unique_clicks": 1, "unique_ctr": 0.162075, "unique_inline_link_clicks": 0, "unique_link_clicks_ctr": 0.0, "unique_outbound_clicks_ctr": [{"value": 0.0}], "updated_time": "2021-08-27", "website_purchase_roas": [{"value": 0.0}], "wish_bid": 0.0}, "emitted_at": 1682686105461} -{"stream": "ads_insights_action_type", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "actions": [{"action_type": "link_click", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_type": "page_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_type": "post_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}], "ad_id": "23846765228310398", "ad_name": "Airbyte Ad", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 3, "conversion_rate_ranking": "UNKNOWN", "cost_per_action_type": [{"action_type": "link_click", "value": 0.396667, "1d_click": 0.396667, "7d_click": 0.396667, "28d_click": 0.396667}, {"action_type": "page_engagement", "value": 0.396667, "1d_click": 0.396667, "7d_click": 0.396667, "28d_click": 0.396667}, {"action_type": "post_engagement", "value": 0.396667, "1d_click": 0.396667, "7d_click": 0.396667, "28d_click": 0.396667}], "cost_per_estimated_ad_recallers": 0.007, "cost_per_inline_link_click": 0.396667, "cost_per_inline_post_engagement": 0.396667, "cost_per_outbound_click": [{"action_type": "outbound_click", "value": 0.396667}], "cost_per_unique_action_type": [{"action_type": "link_click", "value": 0.396667, "1d_click": 0.396667, "7d_click": 0.396667, "28d_click": 0.396667}, {"action_type": "page_engagement", "value": 0.396667, "1d_click": 0.396667, "7d_click": 0.396667, "28d_click": 0.396667}, {"action_type": "post_engagement", "value": 0.396667, "1d_click": 0.396667, "7d_click": 0.396667, "28d_click": 0.396667}], "cost_per_unique_click": 0.396667, "cost_per_unique_inline_link_click": 0.396667, "cost_per_unique_outbound_click": [{"action_type": "outbound_click", "value": 0.396667}], "cpc": 0.396667, "cpm": 0.902199, "cpp": 0.948207, "created_time": "2021-02-09", "ctr": 0.227445, "date_start": "2021-02-15", "date_stop": "2021-02-15", "engagement_rate_ranking": "UNKNOWN", "estimated_ad_recall_rate": 13.545817, "estimated_ad_recallers": 170.0, "frequency": 1.050996, "impressions": 1319, "inline_link_click_ctr": 0.227445, "inline_link_clicks": 3, "inline_post_engagement": 3, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "outbound_clicks": [{"action_type": "outbound_click", "value": 3.0}], "outbound_clicks_ctr": [{"action_type": "outbound_click", "value": 0.227445}], "quality_ranking": "UNKNOWN", "reach": 1255, "social_spend": 0.0, "spend": 1.19, "unique_actions": [{"action_type": "link_click", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_type": "page_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}, {"action_type": "post_engagement", "value": 3.0, "1d_click": 3.0, "7d_click": 3.0, "28d_click": 3.0}], "unique_clicks": 3, "unique_ctr": 0.239044, "unique_inline_link_click_ctr": 0.239044, "unique_inline_link_clicks": 3, "unique_link_clicks_ctr": 0.239044, "unique_outbound_clicks": [{"action_type": "outbound_click", "value": 3.0}], "unique_outbound_clicks_ctr": [{"action_type": "outbound_click", "value": 0.239044}], "updated_time": "2021-08-27", "website_ctr": [{"action_type": "link_click", "value": 0.227445}], "website_purchase_roas": [{"value": 0.0}], "wish_bid": 0.0}, "emitted_at": 1682686105805} -{"stream": "ads_insights_action_type", "data": {"account_currency": "USD", "account_id": "212551616838260", "account_name": "Airbyte", "ad_id": "23846784938030398", "ad_name": "Stock photo ad 2", "adset_id": "23846765228280398", "adset_name": "Vanilla awareness ad set", "buying_type": "AUCTION", "campaign_id": "23846765228240398", "campaign_name": "Airbyte Awareness Campaign 1 (sherif)", "catalog_segment_value_mobile_purchase_roas": [{"value": 0.0}], "clicks": 0, "conversion_rate_ranking": "UNKNOWN", "cost_per_estimated_ad_recallers": 0.0085, "cpm": 1.177285, "cpp": 1.233672, "created_time": "2021-02-11", "ctr": 0.0, "date_start": "2021-02-15", "date_stop": "2021-02-15", "engagement_rate_ranking": "UNKNOWN", "estimated_ad_recall_rate": 14.513788, "estimated_ad_recallers": 100.0, "frequency": 1.047896, "impressions": 722, "inline_link_clicks": 0, "inline_post_engagement": 0, "mobile_app_purchase_roas": [{"value": 0.0}], "objective": "BRAND_AWARENESS", "optimization_goal": "AD_RECALL_LIFT", "outbound_clicks_ctr": [{"value": 0.0}], "quality_ranking": "UNKNOWN", "reach": 689, "social_spend": 0.0, "spend": 0.85, "unique_clicks": 0, "unique_ctr": 0.0, "unique_inline_link_clicks": 0, "unique_link_clicks_ctr": 0.0, "unique_outbound_clicks_ctr": [{"value": 0.0}], "updated_time": "2021-08-27", "website_purchase_roas": [{"value": 0.0}], "wish_bid": 0.0}, "emitted_at": 1682686105822} {"stream": "campaigns", "data": {"account_id": "212551616838260", "budget_rebalance_flag": false, "budget_remaining": 0.0, "buying_type": "AUCTION", "created_time": "2021-01-18T21:36:42-0800", "effective_status": "PAUSED", "id": "23846542053890398", "name": "Fake Campaign 0", "objective": "MESSAGES", "smart_promotion_type": "GUIDED_CREATION", "source_campaign_id": 0.0, "special_ad_category": "NONE", "start_time": "1969-12-31T15:59:59-0800", "updated_time": "2021-02-18T01:00:02-0800"}, "emitted_at": 1682686106887} {"stream": "campaigns", "data": {"account_id": "212551616838260", "budget_rebalance_flag": false, "budget_remaining": 0.0, "buying_type": "AUCTION", "created_time": "2021-01-18T21:36:16-0800", "effective_status": "PAUSED", "id": "23846542048150398", "name": "Fake Campaign 0", "objective": "MESSAGES", "smart_promotion_type": "GUIDED_CREATION", "source_campaign_id": 0.0, "special_ad_category": "NONE", "start_time": "1969-12-31T15:59:59-0800", "updated_time": "2021-02-18T01:00:04-0800"}, "emitted_at": 1682686106887} {"stream": "campaigns", "data": {"account_id": "212551616838260", "budget_rebalance_flag": false, "budget_remaining": 0.0, "buying_type": "AUCTION", "created_time": "2021-01-18T21:33:03-0800", "effective_status": "PAUSED", "id": "23846542041640398", "name": "Fake Campaign 0", "objective": "MESSAGES", "smart_promotion_type": "GUIDED_CREATION", "source_campaign_id": 0.0, "special_ad_category": "NONE", "start_time": "1969-12-31T15:59:59-0800", "updated_time": "2021-02-18T01:00:03-0800"}, "emitted_at": 1682686106888}