[ads] Add "Sponsored ads enabled" toggle to settings on Desktop #58786
Copy link
Copy link
Labels
Description
Add an "Enable Sponsored Ads" toggle to the Data collection section of brave://settings/privacy on Desktop, matching the mobile settings.
Test plan
Test case 1
- Open brave://settings/privacy → Data collection section
- Verify an "Enable Sponsored Ads" toggle is present with correct label/description
- Toggle "Enable Sponsored Ads" setting off
- Verify New Tab Page Ads are no longer shown
- Trigger search result ad with conversion data attributes (check JSON-LD contains these attributes)
- Click the search result ad
- Verify that the search result ad conversion not listed in "Active Brave Ads conversion URL patterns" in brave://ads-internals
- Toggle "Enable Sponsored Ads" setting on
- Verify New Tab Page Ads are shown again
- Trigger search result ad with conversion data attributes (check JSON-LD contains these attributes)
- Click the search result ad
- Verify that the search result ad conversion is listed in "Active Brave Ads conversion URL patterns" in brave://ads-internals
- Restart the browser. Verify toggle state persisted
- Enable Rewards
- Verify that notification ads are served
- Toggle "Enable Sponsored Ads" off
- Verify that notification ads are still served
Test case 2
- Install the previous version of the browser
- Leave "New Tab Page Ads" enabled in settings on NTP
- Upgrade to the new version
- Open brave://settings/privacy → Data collection section
- Verify "Enable Sponsored Ads" toggle is on
Test case 3
- Install the previous version of the browser
- Disable "Show New Tab Page Ads" toggle in "Background Image" settings on NTP
- Upgrade to the new version
- Open brave://settings/privacy → Data collection section
- Verify "Enable Sponsored Ads" toggle is off
Test case 4
- Install the previous version of the browser
- Disable "Show New Tab Page Ads" toggle in "Top Sites" settings on NTP
- Upgrade to the new version
- Open brave://settings/privacy → Data collection section
- Verify "Enable Sponsored Ads" toggle is off
Test case 5
- Install Brave Origin
- Verify that "Enable Sponsored Ads" toggle not shown in settings
Reactions are currently unavailable