Hello, could someone help me? I'm using Tap-TikTok...
# plugins-general
f
Hello, could someone help me? I'm using Tap-TikTok and I need metrics for spend, impressions, clicks, and complete views. But I can't get them. I'm pulling multiple streams and still have no luck. Does anyone know exactly how I can get them?
a
Are you using
gthesheep
variant (Gary James)?
The
campaigns_basic_data_metrics_by_day
stream should give you what you need. What streams are you seeing returned? Happy to help if you can share your
meltano.yml
too.
f
Copy code
Yes, I'm using this variant.
The stream fields are created in BigQuery, but they arrive empty. The ads fields arrive normally. My problem is exclusively with the metrics. In Airbyte, it works perfectly only with the ads_reports_daily stream.

My meltano.yml:

- name: tap-tiktok
variant: gthesheep
pip_url: git+<https://github.com/gthesheep/tap-tiktok.git>
config:
start_date: '2025-01-01'
select:
- ads.*
- ads_basic_data_metrics_by_day
- ads_video_play_metrics_by_day
- campaigns_basic_data_metrics_by_day
e
@Felipe Solera Bosso have you tried adding
.*
to the other patterns?
f
Copy code
yes, I tried and nothing worked, is there anything I can do to solve this? or does anyone have a real example of this tap absorbing metric data
a
I use this tap daily and works fine. Do you see any error messages? Or just no data whatsoever? Can you try
meltano invoke tap-tiktok
and see if if the tap is an issue or your target? What meltano command are you running?
f
I ran
meltano invoke tap-tiktok
and it works — it successfully connects and returns data. But right now it’s only returning the
ads
stream
, which contains ad metadata (IDs, names, campaign/adgroup references, landing page URL, etc.), not performance metrics. That’s why I don’t see fields like
spend
,
impressions
,
clicks
, or
complete_views
.
a
Can you remove the
select
block from your meltano.yml completely for this tap and run again?
f
"I ran the tap-tiktok invoke without --select and it returned all streams and records, but no data appeared in BigQuery. It seems like tap is extracting the data, but it's not reaching the target. Example of what appeared in the terminal: {"type": "RECORD", "stream": "campaigns", "record": {"advertiser_id": "7483174745081790480", "create_time": "2025-08-14 202150", "objective": "LANDING_PAGE", "budget": 57000.0, "objective_type": "REACH", "deep_bid_type": null, "modify_time": "2025-08-28 121227", "is_new_structure": true, "campaign_name": "PER00055_colecao-ago_pace_tiktok_alcance_cpm", "budget_mode": "BUDGET_MODE_TOTAL", "roas_bid": 0.0, "campaign_id": "1840458814058594", "campaign_type": "REGULAR_CAMPAIGN"}, "time_extracted": "2025-09-02T141647.895413Z"} E isso se repetiu para todas as streams de métricas.”
Correcting me, this is campaign data, it worked and went to BigQuery, but metric data such as spend and clicks were not marked in the invoke, even though I removed the field from the select
a
OK, that's good and helps narrow down. Next assuming you are on a *nix platform try
meltano invoke tap-tiktok > output.jsonl
and see if the desired stream is in the output file
Then search the file for the
campaigns_basic_data_metrics_by_day
stream
THese are the streams the tap will produce by default:
Copy code
ad_accounts
ad_groups
ads
ads_attribute_metrics
ads_attribution_metrics_by_day
ads_basic_data_metrics_by_day
ads_engagement_metrics_by_day
ads_in_app_event_metrics_by_day
ads_page_event_metrics_by_day
ads_video_play_metrics_by_day
campaigns
campaigns_attribute_metrics
campaigns_attribution_metrics_by_day
campaigns_basic_data_metrics_by_day
campaigns_engagement_metrics_by_day
campaigns_in_app_event_metrics_by_day
campaigns_page_event_metrics_by_day
campaigns_video_play_metrics_by_day
f
I ran
meltano invoke tap-tiktok > output.jsonl
as suggested and then searched for the
campaigns_basic_data_metrics_by_day
stream. Here's what I found: {"type": "SCHEMA", "stream": "campaigns_basic_data_metrics_by_day", "schema": {...}} {"type": "STATE", "value": {"bookmarks": {"campaigns_basic_data_metrics_by_day": {}}}} The Stream exists, the SCHEMA section shows the fields that
campaigns_basic_data_metrics_by_day
would have (spend, cpc, impressions, clicks, conversions, etc.). No actual metric records were extracted — all the STATE bookmarks are empty, meaning no data was pulled.
1
a
You got me looking at my data but we haven't run any ads live for 2 months. So you will only get metrics if you are actively running ads now, or have been in the past. Is it only the ``campaigns_basic_data_metrics_by_day` that is empty? Are all the other metrics by day streams empty? If you can logon to ads account online can you see what is running? Have these ads all been recently created?
If you have historical data make sure that 'start_date' is sufficiently far back to get this
f
Thanks for getting back to me. We actually did have active campaigns in the past 2 months, so we expected metrics like spend, impressions, clicks, and complete views to already be available. The
ads
stream is bringing ad metadata correctly, but the
ads_basic_data_metrics_by_day
stream (and possibly other daily metric streams) is still returning empty. I’ve also reviewed the
start_date
parameter to ensure it covers the correct period. Could you confirm if there is any specific limitation in the API or additional configuration required for these metric streams to return data?
Copy code
I checked the start date and the save status, we currently have airbyte active and it is resulting in data normally
a
Sorry you're experiencing this. I didn't do any extra config to retrieve the metrics streams - they arrived automatically with the basic tap setup.
I'm assuming you are using exactly the same advertiser ID and credentials for airbyte as your are for meltano? The only other thing I could suggest is making a rest call replicating the settings for that stream via postman or similar and seeing if any data is returned.
Given that you say the airbyte stream
AdsReportsDaily
returns data, can you see any metrics in the
ads_basic_data_metrics_by_day
meltano stream? That would be the equivalent in the meltano tap.
Have you also tried a run with the
--full-refresh
flag to reset the state? Try setting the
lookback
in the config to
100
to see if that has an effect. https://github.com/GtheSheep/tap-tiktok/blob/653e286c1d68e2883caf836202e639b8f175ae8b/tap_tiktok/tap.py#L79
f
not worked, I tried to make the request with requests without meltano and apparently to have the metrics data I need the auth token, in meltano too?