-
Notifications
You must be signed in to change notification settings - Fork 868
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
[ads] Add SmartNTT virtual prefs and condition matchers #26284
Conversation
2c363fd
to
91ae0d6
Compare
a6bb11f
to
bba38b0
Compare
ea60b9f
to
835c26e
Compare
8394a04
to
cddad72
Compare
[puLL-Merge] - brave/brave-core@26284 DescriptionThis PR introduces significant changes to the Brave Ads targeting and condition matching system. It refactors and expands the existing condition matcher functionality, improving its flexibility and capabilities. The changes include new types of condition matchers, reorganization of the code structure, and updates to related components. ChangesChanges
Possible Issues
Security HotspotsNo significant security issues are apparent in this change. However, careful testing should be done to ensure that the new condition matching system doesn't unintentionally expose sensitive information or allow for unintended ad targeting. |
bd0ceb5
to
94ec559
Compare
Released in v1.73.59 |
Resolves brave/brave-browser#41927
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Adds support for the following virtual pref condition matchers:
where
operating_system.name
can be "Windows", "Mac OS X", "Linux", "Android", "iOS", or "Unknown".where SKUs status can be either
beta
,trial
,paid
, orcanceled
.Example to match if running on a desktop operating system:
Example to match if a VPN premium subscription is canceled and expired 30 or more days ago:
--
[numerical operator]:number
condition matcher which supports the following operators:This matcher triggers an ad based on when a real number (integers or fractions) stored at "prefPath". For instance, the example below will serve an ad only if the value stored at "foo.bar" is not equal to 3:
Also, changes epoch condition matchers from
[?]:*
to[T?]:*
. Epoch condition matchers now support IOS 8601 date and time stored as string values at the pref path, i.e.2024-09-30T19:00:00T
,30 Sept 2024 19:00:00 EST
etc.