fix(source-tiktok-marketing): Add missing video metrics to audience report streams (AI-Triage PR)#74085
Conversation
…eport streams The audience_base_report_retriever only requested basic metrics (spend, cpc, cpm, impressions, clicks, ctr) while the base_report_retriever included video engagement metrics. This adds the same video metrics to audience report streams: video_play_actions, video_watched_2s, video_watched_6s, average_video_play, average_video_play_per_user, video_views_p25/p50/p75/p100, profile_visits, likes, comments, shares, follows, clicks_on_music_disc, real_time_app_install, real_time_app_install_cost, app_install, reach, cost_per_1000_reached, frequency. Also adds corresponding schema properties to the audience_report schema. Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
Co-Authored-By: bot_apk <apk@cognition.ai>
|
Deploy preview for airbyte-docs ready! ✅ Preview Built with commit d81b8e9. |
|
Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
…ever Co-Authored-By: bot_apk <apk@cognition.ai>
Remove real_time_app_install, real_time_app_install_cost, and app_install from audience_base_report_retriever and audience_base_report_lifetime. Per TikTok API docs, these metrics are not supported for report_type "AUDIENCE" and would cause API errors breaking all audience report streams. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the 3 unsupported AUDIENCE metrics (real_time_app_install, real_time_app_install_cost, app_install) from the test metrics list and add the new video/engagement metrics to the response fixture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-prove-fix
|
Fix Validation EvidenceOutcome: Fix/Feature Proven Successfully Evidence SummaryTested on 1 live connection with 13 audience report streams enabled. After pinning the source to pre-release version Next Steps
Connector & PR DetailsConnector: Evidence PlanProving CriteriaA sync on a connection with audience report streams enabled completes successfully AND the audience report records contain the new metrics fields (e.g., Disproving Criteria
Cases Attempted
Pre-flight Checks
Detailed Evidence LogPre-release publish: Workflow https://github.com/airbytehq/airbyte/actions/runs/22507580354 — succeeded Live connection test (timestamp: 2026-02-27T23:36:58Z):
Note: Connection IDs and detailed logs are recorded in the linked private issue. |
|
What
Resolves https://github.com/airbytehq/oncall/issues/11463:
The
audience_base_report_retrieverandaudience_base_report_lifetime(used by all*_audience_reports_*streams) only requested 6 basic metrics (spend,cpc,cpm,impressions,clicks,ctr) from the TikTok API. Meanwhile, thebase_report_retriever(used by non-audience report streams likeads_reports_daily) already requested video engagement metrics and social interaction metrics. This meant audience report streams were missing fields likevideo_play_actions,video_views_p25/p50/p75/p100,likes,shares, etc.How
manifest.yamlline ~903 (audience_base_report_retriever) — Expanded themetricsparameter to include the same default metrics thatbase_report_retrieveralready requests:reach,cost_per_1000_reached,frequency, video metrics (video_play_actions,video_watched_2s,video_watched_6s,average_video_play,average_video_play_per_user,video_views_p25/p50/p75/p100), social metrics (profile_visits,likes,comments,shares,follows,clicks_on_music_disc), and app install metrics (real_time_app_install,real_time_app_install_cost,app_install).manifest.yamlline ~1975 (audience_base_report_lifetime) — Applied the same metrics expansion to the lifetime variant of the audience retriever. This is a separate definition from the daily retriever and was also missing the same metrics.manifest.yamlaudience_reportschema — Added corresponding schema property definitions for all newly-requested metrics undermetrics.properties, matching the types used in thebase_reportschema.Version bump — Bumped connector version from
5.0.1→5.0.2inmetadata.yamland added a changelog entry.Test update — Updated the
metricslist intest_advertisers_audience_reports.pyto match the expanded metrics, so the HTTP mock matches the actual request the connector now makes.Review guide
manifest.yamlline ~903 — the metrics list change inaudience_base_report_retriever(daily streams)manifest.yamlline ~1975 — the metrics list change inaudience_base_report_lifetime(lifetime streams)manifest.yamllines ~5213-5307 — the new schema properties in theaudience_reportschemaunit_tests/integration/test_advertisers_audience_reports.py— updated test mock metrics to match expanded listmetadata.yaml— version bump to5.0.2docs/integrations/sources/tiktok-marketing.md— changelog entryThe
audience_base_report_retrieverusesreport_type: "AUDIENCE"whereas thebase_report_retrieverusesreport_type: "BASIC". A reviewer should confirm that the TikTok Reporting API (/report/integrated/get/) supports these additional metrics whenreport_typeis"AUDIENCE". If the API rejects unsupported metrics, this change could cause errors on all audience report streams. I was unable to confirm this from the public API docs alone.👀 Human review checklist
report_type: "AUDIENCE"(not just"BASIC")base_reportschema)report_metricsin a way that conflicts with the new defaultsaudience_base_report_retrieverat ~903 andaudience_base_report_lifetimeat ~1975) have identical metrics listsUser Impact
All audience report streams (
ads_audience_reports_by_province_daily,ads_audience_reports_by_country_daily,ads_audience_reports_by_platform_daily,ads_audience_reports_daily,advertisers_audience_reports_lifetime, and their campaign/adgroup/advertiser equivalents) will now include video engagement and social interaction metrics that were previously missing. This is an additive schema change — existing fields are unchanged.Can this PR be safely reverted and rolled back?
Link to Devin run: https://app.devin.ai/sessions/fd0925114d814d119b1d3ae414ae1b03
Requested by: bot_apk (apk@cognition.ai)