-
Notifications
You must be signed in to change notification settings - Fork 867
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 search result ad right button click handling #25786
base: master
Are you sure you want to change the base?
Conversation
components/brave_ads/core/internal/ad_units/creative_ad_cache.cc
Outdated
Show resolved
Hide resolved
components/brave_ads/core/internal/ad_units/creative_ad_cache.cc
Outdated
Show resolved
Hide resolved
components/brave_ads/core/internal/ad_units/creative_ad_cache.cc
Outdated
Show resolved
Hide resolved
components/brave_ads/core/internal/ad_units/creative_ad_cache.cc
Outdated
Show resolved
Hide resolved
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.
LGTM++
[puLL-Merge] - brave/brave-core@25786 Here's my review of the pull request: DescriptionThis PR updates the handling of Brave Search Result Ads, primarily focusing on improving the management of ad events and caching mechanisms. The changes aim to enhance the efficiency and reliability of ad tracking, particularly for viewed and clicked events. ChangesChanges
Possible Issues
Security HotspotsNo major security concerns were identified in this change. However, careful handling of user data and ad information should always be maintained, especially when implementing new caching mechanisms. Overall, this PR appears to improve the management of Brave Search Result Ads by introducing more efficient caching and event handling. The changes seem well-structured and should enhance the performance and reliability of ad-related features in Brave browser. |
Resolves brave/brave-browser#40785
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:
Test case 1
giraffe
keywordSearch result ad: Not allowed to fire event
Failed to fire search result ad kServedImpression event for placement_id %%% and creative instance id %%%
Clicked search result ad with placement id %%% and creative instance id %%%
Successfully saved creative set conversions
Converted click conversion for kSearchResultAd with creative instance id %%%, creative set id d81220f2-b7c6-4f3e-b3fa-5e0f579407a5, campaign id %%% and advertiser id %%%
Test case 2
giraffe
keywordSearch result ad: Not allowed to fire event
Failed to fire search result ad kServedImpression event for placement_id %%% and creative instance id %%%
CMD+RIGHT
click to the search result ad to open it in a new tab in a backgroundClicked search result ad with placement id %%% and creative instance id %%%
Converted click conversion for kSearchResultAd with creative instance id %%%, creative set id d81220f2-b7c6-4f3e-b3fa-5e0f579407a5, campaign id %%% and advertiser id %%%
Test case 3
giraffe
keywordSearch result ad: Not allowed to fire event
Failed to fire search result ad kServedImpression event for placement_id %%% and creative instance id %%%
Open Link in New Window
from context menu)Clicked search result ad with placement id %%% and creative instance id %%%
Converted click conversion for kSearchResultAd with creative instance id %%%, creative set id d81220f2-b7c6-4f3e-b3fa-5e0f579407a5, campaign id %%% and advertiser id %%%
Test case 4
giraffe
keywordViewed search result ad impression with placement id %%% and creative instance id %%%
Clicked search result ad with placement id %%% and creative instance id %%%
Successfully saved creative set conversions
Maybe land on page for https://brave.com/brave-ads/?no_key_param= in 5 s
Landed on page for https://brave.com/brave-ads/?no_key_param= on tab id %%%
Converted click conversion for kSearchResultAd with creative instance id %%%, creative set id d81220f2-b7c6-4f3e-b3fa-5e0f579407a5, campaign id %%% and advertiser id %%%
Test case 5
giraffe
keywordViewed search result ad impression with placement id %%% and creative instance id %%%
Converted view conversion for kSearchResultAd with creative instance id %%%, creative set id d81220f2-b7c6-4f3e-b3fa-5e0f579407a5, campaign id %%% and advertiser id %%%
Test case 6
giraffe
keywordViewed search result ad impression with placement id %%% and creative instance id %%%
CMD+RIGHT
click to the search result ad to open it in a new tab in a backgroundClicked search result ad with placement id %%% and creative instance id %%%
Successfully saved creative set conversions
Maybe land on page for https://brave.com/brave-ads/?no_key_param= in 5 s
Suspended page landing on tab id 511936837 with 5 s remaining
Landed on page for https://brave.com/brave-ads/?no_key_param= on tab id %%%
Converted click conversion for kSearchResultAd with creative instance id %%%, creative set id d81220f2-b7c6-4f3e-b3fa-5e0f579407a5, campaign id %%% and advertiser id %%%
Test case 7
giraffe
keywordViewed search result ad impression with placement id %%% and creative instance id %%%
Open Link in New Window
from context menu)Clicked search result ad with placement id %%% and creative instance id %%%
Successfully saved creative set conversions
Maybe land on page for https://brave.com/brave-ads/?no_key_param= in 5 s
Landed on page for https://brave.com/brave-ads/?no_key_param= on tab id %%%
Converted click conversion for kSearchResultAd with creative instance id %%%, creative set id d81220f2-b7c6-4f3e-b3fa-5e0f579407a5, campaign id %%% and advertiser id %%%
Test case 8
giraffe
keywordOpen Link in Private Window
from context menu)Clicked search result ad with placement id %%% and creative instance id %%%