Skip to content
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

Support day-parting for Brave Ads #5234

Closed
jsecretan opened this issue Jul 12, 2019 · 2 comments · Fixed by brave/brave-core#6893
Closed

Support day-parting for Brave Ads #5234

jsecretan opened this issue Jul 12, 2019 · 2 comments · Fixed by brave/brave-core#6893

Comments

@jsecretan
Copy link

Description

Certain ads make the most sense during certain parts of the day. For instance, it may make sense to advertise restaurant chains before lunch to maximum success.

This issue is dependent on #5023

The campaign field now has a list of day parts. If this list is empty, this can be ignored. But if there are entries in the list, any creatives under the campaign should only be eligible to show during the given times, in the timezone of the user.

@jsecretan jsecretan added priority/P3 The next thing for us to work on. It'll ride the trains. feature/ads labels Jul 12, 2019
@tmancey tmancey assigned tmancey and unassigned tmancey Jul 17, 2019
@tmancey tmancey removed their assignment Aug 22, 2019
@tmancey tmancey self-assigned this Jan 17, 2020
@tmancey tmancey changed the title Support day-parting for ads Support day-parting for Brave Ads Jan 20, 2020
@tmancey tmancey removed their assignment Jan 22, 2020
@tmancey tmancey self-assigned this Feb 27, 2020
@tmancey tmancey removed their assignment Feb 27, 2020
@tmancey tmancey added OS/Android Fixes related to Android browser functionality OS/Desktop and removed priority/P3 The next thing for us to work on. It'll ride the trains. release-notes/include labels Aug 5, 2020
@tmancey tmancey added priority/P3 The next thing for us to work on. It'll ride the trains. QA/Yes release-notes/include and removed OS/Android Fixes related to Android browser functionality labels Aug 20, 2020
@srirambv srirambv changed the title Support day-parting for Brave Ads [Desktop] Support day-parting for Brave Ads Sep 9, 2020
@yachtcaptain23 yachtcaptain23 self-assigned this Sep 11, 2020
@tmancey tmancey changed the title [Desktop] Support day-parting for Brave Ads Support day-parting for Brave Ads Oct 20, 2020
@yachtcaptain23
Copy link

Dayparting, which is described in bat-native-ads/data/resources/catalog-scheme.json is now added as a filter rule. Any existing fields with empty parting will not be filtered.

The major note for server-side devs and reviewers is that the dow field will store the C++ version of day of week as a string of integers, where 0 is Sunday and 6 is Saturday. This is done to compress the catalog size for multiple days using the same time period.

Given that there is a transition period of empty dayparts in the catalog, we will assume empty values to apply to all days of the week and at all hours

@moritzhaller
Copy link

moritzhaller commented Dec 3, 2020

Verification passed on macos 10.15.6 x64

Tried to verified test plan from description:

  • Confirm new tab pages and notifications with no dayparts still appear (verified)
  • Confirm new tab pages and notifications with dayparts only appear based on the schedule (out of scope as discussed with @tmancey)
Brave | 1.20.5 Chromium: 87.0.4280.67 (Official Build) nightly (x86_64)
-- | --
Revision | 0e5d92df40086cf0050c00f87b11da1b14580930-refs/branch-heads/4280@{#1441}
OS | macOS Version 10.15.6 (Build 19G2021)

and Windows on

Version 1.18.69 Chromium: 87.0.4280.88 (Official Build) (64-bit)

Steps:

  • get catalog from ads endpoint and copy/paste to local to map for subsequent requests via charles proxy
  • get Nightly RC https://github.com/brave/brave-browser/releases/tag/v1.18.68
  • start browser on fresh profile /Applications/Brave\ Browser\ Nightly.app/Contents/MacOS/Brave\ Browser\ Nightly --args --enable-logging=stderr --vmodule="*/bat-native-ads/*"=6,"*/brave_ads/*"=6,"*/brave_user_model/*"=6,"*/bat_ads/*"=6 --use-dev-goupdater-url --brave-ads-staging --rewards=staging=true
  • trigger ad notification without day parts
  • modify dayparts for current time to be outside daypart (dow - 1) > no ad on fresh profile
  • modify dayparts for current time to be inside daypart window > ad on fresh profile
  • modify dayparts for current time to be outside daypart window (startMinute - 5min) > ad on fresh profile does not show, after waiting for 6 minutes and trying again ad does show
  • test 0/0 and 1439/1439 dayparts > ads don't show

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants