-
Notifications
You must be signed in to change notification settings - Fork 116
feat(): update ltv client references to new new profile clients #7728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,20 +42,20 @@ SELECT | |
WHERE | ||
key <= clients_yearly.submission_date | ||
) AS total_historic_ad_clicks, | ||
firefox_android_clients.first_reported_country, | ||
firefox_android_clients.first_reported_isp, | ||
firefox_android_clients.adjust_network, | ||
firefox_android_clients.install_source, | ||
clients.country AS first_reported_country, | ||
CAST(NULL AS STRING) AS first_reported_isp, | ||
clients.adjust_network, | ||
clients.install_source, | ||
FROM | ||
clients_yearly | ||
JOIN | ||
`moz-fx-data-shared-prod.fenix.firefox_android_clients` AS firefox_android_clients | ||
USING (sample_id, client_id) | ||
`moz-fx-data-shared-prod.fenix.new_profile_clients` AS clients | ||
USING (client_id) | ||
LEFT JOIN | ||
`moz-fx-data-shared-prod.fenix.client_adclicks_history` | ||
USING (sample_id, client_id) | ||
WHERE | ||
-- BrowserStack clients are bots, we don't want to accidentally report on them | ||
first_reported_isp != "BrowserStack" | ||
app_name <> "Fenix BrowserStack" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also be exluding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we are only excluding BrowserStack due to bots, not due to DAU definitions (this is more LTV focused than DAU focused). I think it's ok to leave as is, thanks for checking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kwindau one more question, is there a use case where we may want to look at this data and filter out Mozilla Online users? |
||
-- Remove clients who are new on this day, but have more/less than 1 day of activity | ||
AND NOT (days_since_first_seen = 0 AND BIT_COUNT(days_seen_bytes) != 1) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,16 +60,16 @@ SELECT | |
ac.durations, | ||
ac.ad_clicks, | ||
ac.total_historic_ad_clicks, | ||
c.adjust_network, | ||
c.first_reported_country, | ||
c.first_reported_isp | ||
clients.adjust_network, | ||
clients.country AS first_reported_country, | ||
CAST(NULL AS STRING) AS first_reported_isp, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
FROM | ||
ad_clicks ac | ||
JOIN | ||
`moz-fx-data-shared-prod.firefox_ios.firefox_ios_clients` c | ||
USING (sample_id, client_id) | ||
`moz-fx-data-shared-prod.firefox_ios.new_profile_clients` AS clients | ||
USING (client_id) | ||
WHERE | ||
-- BrowserStack clients are bots, we don't want to accidentally report on them | ||
COALESCE(first_reported_isp, '') != "BrowserStack" | ||
app_name <> "Firefox iOS BrowserStack" | ||
-- Remove clients who are new on this day, but have more/less than 1 day of activity | ||
AND NOT (days_since_first_seen = 0 AND BIT_COUNT(days_seen_bytes) != 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the last part since it's joinable with anything on client_id.