Skip to content

Commit 5c47ddb

Browse files
devin-ai-integration[bot]bot_apksophiecuiyclaude
authored
fix(source-tiktok-marketing): Add missing video metrics to audience report streams (AI-Triage PR) (#74085)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: bot_apk <apk@cognition.ai> Co-authored-by: Sophie Cui <sophie.cui@airbyte.io> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent caf17f4 commit 5c47ddb

5 files changed

Lines changed: 148 additions & 6 deletions

File tree

airbyte-integrations/connectors/source-tiktok-marketing/manifest.yaml

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ definitions:
900900
report_type: "AUDIENCE"
901901
data_level: '{{ parameters["data_level"] }}'
902902
dimensions: '{{ parameters["dimensions"] | string }}'
903-
metrics: '{{ (parameters.get("report_metrics", []) + ["spend", "cpc", "cpm", "impressions", "clicks", "ctr"]) | string }}'
903+
metrics: '{{ (parameters.get("report_metrics", []) + ["spend", "cpc", "cpm", "impressions", "clicks", "ctr", "reach", "cost_per_1000_reached", "frequency", "video_play_actions", "video_watched_2s", "video_watched_6s", "average_video_play", "average_video_play_per_user", "video_views_p25", "video_views_p50", "video_views_p75", "video_views_p100", "profile_visits", "likes", "comments", "shares", "follows", "clicks_on_music_disc"]) | string }}'
904904
start_date: "{{ stream_interval['start_time'] }}"
905905
end_date: "{{ stream_interval['end_time'] }}"
906906
filtering: '{{ [{
@@ -1972,7 +1972,7 @@ definitions:
19721972
report_type: "AUDIENCE"
19731973
data_level: '{{ parameters["data_level"] }}'
19741974
dimensions: '{{ parameters["dimensions"] | string }}'
1975-
metrics: '{{ (parameters.get("report_metrics", []) + ["spend", "cpc", "cpm", "impressions", "clicks", "ctr"]) | string }}'
1975+
metrics: '{{ (parameters.get("report_metrics", []) + ["spend", "cpc", "cpm", "impressions", "clicks", "ctr", "reach", "cost_per_1000_reached", "frequency", "video_play_actions", "video_watched_2s", "video_watched_6s", "average_video_play", "average_video_play_per_user", "video_views_p25", "video_views_p50", "video_views_p75", "video_views_p100", "profile_visits", "likes", "comments", "shares", "follows", "clicks_on_music_disc"]) | string }}'
19761976
start_date: '{{ day_delta(-364, "%Y-%m-%d") if config.get("start_date", "2016-09-01") < day_delta(-364, "%Y-%m-%d") else config["start_date"] }}'
19771977
end_date: "{{ config.get('end_date') if config.get('end_date') else format_datetime(now_utc() + duration('P1D'), '%Y-%m-%d') }}"
19781978
lifetime: "true"
@@ -5210,6 +5210,86 @@ definitions:
52105210
type:
52115211
- "null"
52125212
- string
5213+
frequency:
5214+
description: Average number of times each person saw the ad
5215+
type:
5216+
- "null"
5217+
- string
5218+
video_play_actions:
5219+
description: Actions related to video plays
5220+
type:
5221+
- "null"
5222+
- number
5223+
video_watched_2s:
5224+
description: Number of viewers watching at least 2 seconds of the video
5225+
type:
5226+
- "null"
5227+
- number
5228+
video_watched_6s:
5229+
description: Number of viewers watching at least 6 seconds of the video
5230+
type:
5231+
- "null"
5232+
- number
5233+
average_video_play:
5234+
description: The average number of video plays
5235+
type:
5236+
- "null"
5237+
- number
5238+
average_video_play_per_user:
5239+
description: The average number of video plays per user
5240+
type:
5241+
- "null"
5242+
- number
5243+
video_views_p25:
5244+
description: Percentage of viewers watching at least 25% of the video
5245+
type:
5246+
- "null"
5247+
- number
5248+
video_views_p50:
5249+
description: Percentage of viewers watching at least 50% of the video
5250+
type:
5251+
- "null"
5252+
- number
5253+
video_views_p75:
5254+
description: Percentage of viewers watching at least 75% of the video
5255+
type:
5256+
- "null"
5257+
- number
5258+
video_views_p100:
5259+
description: Percentage of viewers watching the entire video
5260+
type:
5261+
- "null"
5262+
- number
5263+
profile_visits:
5264+
description: Number of visits to the profile
5265+
type:
5266+
- "null"
5267+
- number
5268+
likes:
5269+
description: Number of likes received
5270+
type:
5271+
- "null"
5272+
- number
5273+
comments:
5274+
description: The number of comments received
5275+
type:
5276+
- "null"
5277+
- number
5278+
shares:
5279+
description: Number of shares
5280+
type:
5281+
- "null"
5282+
- number
5283+
follows:
5284+
description: Number of follows
5285+
type:
5286+
- "null"
5287+
- number
5288+
clicks_on_music_disc:
5289+
description: The number of clicks on the music disc
5290+
type:
5291+
- "null"
5292+
- number
52135293
dimensions:
52145294
description:
52155295
Specifies the dimensions or attributes of the audience data being

airbyte-integrations/connectors/source-tiktok-marketing/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ data:
1111
connectorSubtype: api
1212
connectorType: source
1313
definitionId: 4bfac00d-ce15-44ff-95b9-9e3c3e8fbd35
14-
dockerImageTag: 5.0.2
14+
dockerImageTag: 5.0.3-rc.1
1515
dockerRepository: airbyte/source-tiktok-marketing
1616
documentationUrl: https://docs.airbyte.com/integrations/sources/tiktok-marketing
1717
externalDocumentationUrls:

airbyte-integrations/connectors/source-tiktok-marketing/unit_tests/integration/test_advertisers_audience_reports.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,32 @@
1919
class TestAdvertiserAudienceReportsLifetime(TestCase):
2020
stream_name = "advertisers_audience_reports_lifetime"
2121
advertiser_id = "872746382648"
22-
metrics = ["spend", "cpc", "cpm", "impressions", "clicks", "ctr"]
22+
metrics = [
23+
"spend",
24+
"cpc",
25+
"cpm",
26+
"impressions",
27+
"clicks",
28+
"ctr",
29+
"reach",
30+
"cost_per_1000_reached",
31+
"frequency",
32+
"video_play_actions",
33+
"video_watched_2s",
34+
"video_watched_6s",
35+
"average_video_play",
36+
"average_video_play_per_user",
37+
"video_views_p25",
38+
"video_views_p50",
39+
"video_views_p75",
40+
"video_views_p100",
41+
"profile_visits",
42+
"likes",
43+
"comments",
44+
"shares",
45+
"follows",
46+
"clicks_on_music_disc",
47+
]
2348

2449
def catalog(self, sync_mode: SyncMode = SyncMode.full_refresh):
2550
return CatalogBuilder().with_stream(name=self.stream_name, sync_mode=sync_mode).build()

airbyte-integrations/connectors/source-tiktok-marketing/unit_tests/resource/http/response/advertisers_audience_reports_lifetime.json

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,25 @@
1010
"spend": "31.56",
1111
"ctr": "1.26",
1212
"clicks": "87",
13-
"impressions": "6897"
13+
"impressions": "6897",
14+
"reach": "5200",
15+
"cost_per_1000_reached": "6.07",
16+
"frequency": "1.33",
17+
"video_play_actions": 120,
18+
"video_watched_2s": 95,
19+
"video_watched_6s": 60,
20+
"average_video_play": 8.5,
21+
"average_video_play_per_user": 1.2,
22+
"video_views_p25": 80,
23+
"video_views_p50": 55,
24+
"video_views_p75": 35,
25+
"video_views_p100": 20,
26+
"profile_visits": 15,
27+
"likes": 42,
28+
"comments": 8,
29+
"shares": 5,
30+
"follows": 3,
31+
"clicks_on_music_disc": 2
1432
},
1533
"dimensions": {
1634
"age": "AGE_35_44",
@@ -25,7 +43,25 @@
2543
"spend": "0.00",
2644
"ctr": "0.00",
2745
"clicks": "0",
28-
"impressions": "17"
46+
"impressions": "17",
47+
"reach": "12",
48+
"cost_per_1000_reached": "0.00",
49+
"frequency": "1.42",
50+
"video_play_actions": 3,
51+
"video_watched_2s": 2,
52+
"video_watched_6s": 1,
53+
"average_video_play": 4.2,
54+
"average_video_play_per_user": 1.0,
55+
"video_views_p25": 2,
56+
"video_views_p50": 1,
57+
"video_views_p75": 0,
58+
"video_views_p100": 0,
59+
"profile_visits": 0,
60+
"likes": 0,
61+
"comments": 0,
62+
"shares": 0,
63+
"follows": 0,
64+
"clicks_on_music_disc": 0
2965
},
3066
"dimensions": {
3167
"age": "AGE_55_100",

docs/integrations/sources/tiktok-marketing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ For information on breaking changes and migration steps, see the [TikTok Marketi
156156

157157
| Version | Date | Pull Request | Subject |
158158
|:-----------|:-----------|:----------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
159+
| 5.0.3-rc.1 | 2026-03-03 | [74085](https://github.com/airbytehq/airbyte/pull/74085) | Add missing video engagement metrics to audience report streams |
159160
| 5.0.2 | 2026-03-03 | [73111](https://github.com/airbytehq/airbyte/pull/73111) | Update dependencies |
160161
| 5.0.1 | 2026-02-24 | [73633](https://github.com/airbytehq/airbyte/pull/73633) | fix(source-tiktok-marketing): Fix UTC timezone mismatch causing data loss for ahead-of-UTC accounts (AI-Triage PR) |
161162
| 5.0.0 | 2026-02-17 | [73357](https://github.com/airbytehq/airbyte/pull/73357) | Fix `currency` field type from `boolean` to `string` in pixels events schema |

0 commit comments

Comments
 (0)