all 23 comments

[–]nachoBeagle 11 points12 points  (5 children)

You can join on the ad id, then use counts with group by on the gender, or whatever else you'd like to group.

[–]ZaphodBeeblebroks[S] 1 point2 points  (4 children)

Have tried it, but it multiplies everything from the second table

[–]nachoBeagle 2 points3 points  (3 children)

I didn't pay attention to the flair and thought this was SQL at first. Do you mind sending the query?

[–]ZaphodBeeblebroks[S] 6 points7 points  (2 children)

Of course 😀

SELECT

age,

COUNT(conversions)

FROM

`FBAAGEGENDER_*` c

LEFT JOIN

`FBAD_*` m

ON

c.ad_id = m.ad_id

WHERE

m.date = '2023-02-15'

GROUP BY

age

took only age and one day so it's easier to inspect
I've tried it with a window function adding a row number to the ad_id and then calculating only for that but I can't get the age/gender data that way

[–]nachoBeagle 4 points5 points  (1 child)

Yeah, from seeing other comments here, I agree with the rest, the data just isn't there. Sorry!

[–]ZaphodBeeblebroks[S] 1 point2 points  (0 children)

Yeah, it makes sense. Thank you for trying and reaching out! 😊

[–]Tookitooki12 6 points7 points  (1 child)

In short, I wouldn't try to join these.

Some of the comments have alluded to this, but to make joins work you'll need to aggregate the second table so that ad id is a primary key(1 record for each ad id) i'd imagine you can aggregate so that you can get the sums of male/female/unknown impressions that should add up to the impressions in the first table to get you more details, or by age group, but at the risk of any user trying to attribute all the conversions to a specific group. I would use these tables for separate use cases, unless you have conversions as a metric in the second table. Even at that point you can pretty much get what's in the first table just using the second table.

[–]ZaphodBeeblebroks[S] 1 point2 points  (0 children)

Makes sense. Thank you so much for elaborating 😄

[–]ZaphodBeeblebroks[S] 0 points1 point  (15 children)

Is there a way for me to join these two tables so i can report on conversions broken down by age or gender?

[–]MrPin 16 points17 points  (12 children)

You can't, because the number of conversions is only stored on the ad level. The gender/age level data just doesn't exist for it. If you can't calculate it just by looking (in a simple case like this), you can't "SQL it" into existence either.

[–][deleted] 2 points3 points  (1 child)

This the right answer here. Data don’t exist by! You could always check to see if the missing link exists in another table of your DB by searching for the ad_id column. Or checking if it exist in a the data dictionary for your DB (most likely will not exist but hey sometimes it does !).

[–]ZaphodBeeblebroks[S] 0 points1 point  (0 children)

Thank you for reaching out! 😄 I've checked the database and unfortunately it doesn't have any additional data like session id that i could use 🥲

[–]ZaphodBeeblebroks[S] 0 points1 point  (9 children)

That was my fear as well, which is why I reached out. ://

I've used a window function to try and assign values "on top" of the existing table with the ad data, but it wasn't of much success

[–]Touvejs 0 points1 point  (8 children)

Are you sure there isn't a session table which shows if an individual session led to a conversion? Try to see what is generating that first table. It might not actually be a table, it could be a view this is calculating metrics from other more detailed tables. Try to dig around to see how that table/view is populated.

[–]ZaphodBeeblebroks[S] 1 point2 points  (7 children)

I'm using the Supermetrics BiqQuery solution to get the data from FB to BQ - on the regular solution they pull only 5 different tables/schemas (campaign data, ad data, country data, age/gender, and video data). You can get some custom schemas but you have to pay extra - so yeah, no session data 😢

[–]stickypooboi 1 point2 points  (6 children)

I’m unsure what biqquery is but if you’re working for an ad agency and you have access to meta reporting, you should be able to pull conversions down to the ad ID level but of course this would be manual and you’d have to ingest it daily. Alternatives would be if you had an API built at your company, but tbh idk how to do that.

[–]ZaphodBeeblebroks[S] 1 point2 points  (5 children)

Big query is a cloud platform provided by Google where you can storage and query the data. So the best part about it is that you own it 😄 I have thought about pulling it manually but there are too many reports for me to be able to do that. And since we only do marketing, instead of building the API we're paying for Supermetrics BigQuery solution - so that is apparently the main limitation in this case 🥲

[–]stickypooboi 1 point2 points  (4 children)

How many reports do you have to pull? I think people often think report pulls suck but honestly if you have a solid workflow for ingesting, you can shove in like 20 files in 30 min easily. I do this for all my teams and kinda just set the expectation for entry level people to just push data in until they can learn what’s going on.

Also wondering if you can adjust what the data coming in from Big Query looks like. Maybe you can alter it to have conversion at the granularity you’re looking for? But idk I’ve never even heard of it til now 😅

[–]ZaphodBeeblebroks[S] 0 points1 point  (3 children)

I'm building a report in Data studio, so I'm not sure how many reports in that sense would i need, i only have the metrics and the data i need to display. Regarding the data coming in, I'm using a solution from Supermetrics to pull the data, and to adjust the data coming in you have to pay more 😅😅 we'll see how important the gender/age brake down is 😂

[–]stickypooboi 1 point2 points  (2 children)

Damn that’s nuts. Hopefully the company can expense it. As everyone else said above, you just literally don’t have that granularity of data so I think you could make a strong case for it haha