Hey y’all, I’m looking for some help navigating ho...
# troubleshooting
r
Hey y’all, I’m looking for some help navigating how to use the MeltanoLabs variant of tap-facebook. The end result I’m looking for is a record for each ad each day of performance with a bunch of key metrics displayed (clicks, conversions, conversion value, etc). It seems that everything works well other than I can’t for the life of me figure out how to see conversion-related metrics. I see that there are columns called
conversions
and
conversion_values
, but neither end up populating with anything other than
null
, when I know that this shouldn’t be the case because I can see conversions being tracked through Facebook’s reporting in the UI. For some extra context, up until now I’ve been using a custom-written version of this tap that’s been used at my company for the last few years (you can find that here), but it’s been having a lot of issues with rate limiting and it seemed like an easier fix to just use the Meltano-recommended version of the tap. In the version we’ve been using, I can get conversion-related data by navigating the
actions
and
action_values
columns and finding the appropriate key connected to purchases (
offsite_conversion.fb_pixel_purchase
). But when I look at the
actions
dict in the MeltanoLabs version, it doesn’t have anything that would tell me what values are being displayed. I’ll post some screenshots of what I’m seeing in the thread, but for now, here’s the meltano.yml setup I’m using with this tap:
Copy code
- name: tap-facebook
    namespace: tap_facebook
    label: Facebook
    pip_url: git+<https://github.com/MeltanoLabs/tap-facebook.git>
    capabilities:
    - catalog
    - discover
    - state
    config:
      account_id: '********'
      access_token: $TAP_FACEBOOK_ACCESS_TOKEN
      api_version: v20.0
      start_date: '2024-12-01'
    select:
    - adsinsights_default.*
👀 1
An example of what actions and action_values look like in the MeltanoLabs version… Actions:
[{"value": "18542", "1d_view": "17176", "7d_click": "1366"}]
Action_values:
[{"value": "1950.75", "7d_click": "1950.75"}]
👀 1
n
Same issue here. Has a solution been found? looking to get the below
Copy code
{
    "1d_click": 14,
    "1d_view": 2,
    "28d_click": 20,
    "28d_view": 3,
    "7d_click": 17,
    "7d_view": 2,
    "action_type": "offsite_conversion.fb_pixel_add_to_wishlist",
    "value": 19
  },
but only get
Copy code
[{"value":"261599","1d_view":"98707","7d_click":"162892"}]
These are from different data sets. pay not attention to the numbers
e
what's the value you're passing for
insight_reports_list
?
n
Copy code
insight_reports_list:
  - name: "product_id"
    breakdowns: [ "product_id" ]
  - name: "action_type"
    breakdowns: [ "action_type" ]
getting all 3 atm just to see if i can find the right combo
adinsights_default adinsights_product_id and action_type are my end file results
e
(fyi: I'm not very familiar with Facebook's APIs) have you tried setting
action_attribution_windows_view
or
action_attribution_windows_click
? https://github.com/MeltanoLabs/tap-facebook/blob/77d0b0139d131ab7f632e82f8a08df65596b7851/tap_facebook/tap.py#L127-L146
n
No i haven't. good idea. Will give it a try
Copy code
"action_breakdowns": self._report_definition["action_breakdowns"],

//after hardcode
"action_breakdowns": ["action_type"],
ad_insights.py line:292 So here's the actual issue. When any insights report is ran there is no field in the action_breakdowns "params" by hard coding "action_type" the data comes back as expected. so when using the below the params the result of the params is: action_breakdowns: []
Copy code
"action_breakdowns": self._report_definition["action_breakdowns"],
The docs say that action_breakdowns: "action_type" is the default. The docs are wrong. also a side note adding action_breakdowns: ["action_type"] to the tap-extractor does not work as expected. I would bet somewhere along the line it is being filtered out Not sure why this is happening but it is. I am going to correct this in my fork since i already have to use my fork due to the insight_reports_list being incorrectly being configured. https://github.com/MeltanoLabs/tap-facebook/issues/285 There you go.
DEFAULT_INSIGHT_REPORT = { "name": "default", "level": "ad", "action_breakdowns": [], "breakdowns": [], "time_increment_days": 1, "action_attribution_windows_view": "1d_view", "action_attribution_windows_click": "7d_click", "action_report_time": "mixed", "lookback_window": 28, } tap.py maybe the culprit.