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

Debounce Brave Ads clicked events #22936

Closed
tmancey opened this issue May 19, 2022 · 1 comment · Fixed by brave/brave-core#13388
Closed

Debounce Brave Ads clicked events #22936

tmancey opened this issue May 19, 2022 · 1 comment · Fixed by brave/brave-core#13388

Comments

@tmancey
Copy link
Contributor

tmancey commented May 19, 2022

Debounce Brave Ads clicked events, so that metrics are not recorded for multiple clicks for push notification ads, inline content ads, promoted content ads, search result ads and new tab page ads

@btlechowski
Copy link

Verification passed on

Brave 1.41.94 Chromium: 103.0.5060.114 (Official Build) (64-bit)
Revision a1c2360c5b02a6d4d6ab33796ad8a268a6128226-refs/branch-heads/5060@{#1124}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#13388

Inline ads

Verified ad was served:


[3304:3304:0708/162423.624266:VERBOSE1:eligible_inline_content_ads_v1.cc(39)] Get eligible inline content ads:
[3304:3304:0708/162423.647222:VERBOSE1:eligible_inline_content_ads_v1.cc(171)] Get eligible ads for untargeted segment
[3304:3304:0708/162423.655388:VERBOSE2:priority.h(33)] 1 ads with a priority of 1 in bucket 1
[3304:3304:0708/162423.655531:VERBOSE1:eligible_inline_content_ads_v1.cc(192)] 1 eligible ads out of 1 ads for untargeted segment
[3304:3304:0708/162423.655607:VERBOSE1:inline_content_ad_serving.cc(85)] Found 1 eligible ads
[3304:3304:0708/162423.655662:VERBOSE1:inline_content_ad_serving.cc(128)] Serving inline content ad:
  placementId: faa5edc2-f4f3-4217-bb77-a89ad7905d56
  creativeInstanceId: e4958d00-e35c-4134-a408-1fbcf274d5ae
  creativeSetId: 8b848823-c47f-43de-a753-2efa8dea6863
  campaignId: 07de7f05-ab32-4af0-a350-a1bce4427eac
  advertiserId: 93130af3-2def-4ecb-b836-b3772e73b3c9
  segment: untargeted
  title: Staging - Inline Test 1
  description: Fung Brave News Inline Display Ad - mac/linux
  imageUrl: https://pcdn.brave.com/brave-ads/468beb93-2458-5d3e-8d7b-bc1f387d2e9b.webp.pad
  dimensions: 900x750
  ctaText: Work at Brave
  targetUrl: https://brave.com/careers
[3304:3304:0708/162423.669407:VERBOSE1:inline_content_ad_serving.cc(97)] Served inline content ad
[3304:3304:0708/162423.687294:VERBOSE3:inline_content_ad_event_served.cc(24)] Served inline content ad with placement id faa5edc2-f4f3-4217-bb77-a89ad7905d56 and creative instance id e4958d00-e35c-4134-a408-1fbcf274d5ae
[3304:3304:0708/162423.707674:VERBOSE1:inline_content_ad_event_served.cc(32)] Successfully logged inline content ad served event

Verified ad was viewed:

[3304:3304:0708/162431.340026:VERBOSE3:inline_content_ad_event_viewed.cc(24)] Viewed inline content ad with placement id faa5edc2-f4f3-4217-bb77-a89ad7905d56 and creative instance id e4958d00-e35c-4134-a408-1fbcf274d5ae
[3304:3304:0708/162431.349656:VERBOSE6:inline_content_ad_event_viewed.cc(32)] Successfully logged inline content ad viewed event

Verified ad was clicked:

[3304:3304:0708/162440.847422:VERBOSE3:inline_content_ad_event_clicked.cc(23)] Clicked inline content ad with placement id faa5edc2-f4f3-4217-bb77-a89ad7905d56 and creative instance id e4958d00-e35c-4134-a408-1fbcf274d5ae
[3304:3304:0708/162440.866590:VERBOSE6:inline_content_ad_event_clicked.cc(31)] Successfully logged inline content ad clicked event

Verified 2nd click on the ad was blocked:

[3304:3304:0708/162808.961399:VERBOSE1:inline_content_ad.cc(118)] Inline content ad: Not allowed as already fired kClicked event for this placement id faa5edc2-f4f3-4217-bb77-a89ad7905d56
[3304:3304:0708/162808.961606:VERBOSE1:ads_impl.cc(953)] Failed to fire inline content ad kClicked event for placement id faa5edc2-f4f3-4217-bb77-a89ad7905d56 and creative instance id e4958d00-e35c-4134-a408-1fbcf274d5ae

Verified same ad with different placement id is processed properly:

[4334:4334:0708/173341.968998:VERBOSE3:inline_content_ad_event_clicked.cc(23)] Clicked inline content ad with placement id 753ab625-7dbc-4122-98cf-ab2bfa19983b and creative instance id e4958d00-e35c-4134-a408-1fbcf274d5ae
[4334:4334:0708/173342.037129:VERBOSE6:inline_content_ad_event_clicked.cc(31)] Successfully logged inline content ad clicked event

NTP SI

Verified ad was served and viewed:

[4696:4696:0708/174338.845604:VERBOSE3:new_tab_page_ad_event_viewed.cc(23)] Viewed new tab page ad with placement id 6edebd11-c256-4d9d-a253-bd92630159d8 and creative instance id cf3743df-d357-4065-aa3c-e28953b26746
[4696:4696:0708/174338.872699:VERBOSE6:new_tab_page_ad_event_viewed.cc(31)] Successfully logged new tab page ad viewed event
[4696:4696:0708/174338.873120:VERBOSE3:new_tab_page_ad_event_served.cc(23)] Served new tab page ad with placement id 6edebd11-c256-4d9d-a253-bd92630159d8 and creative instance id cf3743df-d357-4065-aa3c-e28953b26746
[4696:4696:0708/174338.888161:VERBOSE3:ads_impl.cc(804)] Successfully processed deposit for new_tab_page_ad with creative instance id cf3743df-d357-4065-aa3c-e28953b26746 and view valued at 0.01
[4696:4696:0708/174338.888517:VERBOSE1:confirmations.cc(61)] Confirming view for new_tab_page_ad with transaction id 77e7ab11-45ef-4006-bff8-17174129d019 and creative instance id cf3743df-d357-4065-aa3c-e28953b26746
[4696:4696:0708/174338.925369:VERBOSE6:new_tab_page_ad_event_served.cc(31)] Successfully logged new tab page ad served event

Verified ad was clicked:

[4696:4696:0708/174346.491811:VERBOSE3:new_tab_page_ad_event_clicked.cc(23)] Clicked new tab page ad with placement id 6edebd11-c256-4d9d-a253-bd92630159d8 and creative instance id cf3743df-d357-4065-aa3c-e28953b26746
[4696:4696:0708/174346.607804:VERBOSE6:new_tab_page_ad_event_clicked.cc(31)] Successfully logged new tab page ad clicked event
[4696:4696:0708/174346.629415:VERBOSE3:ads_impl.cc(804)] Successfully processed deposit for new_tab_page_ad with creative instance id cf3743df-d357-4065-aa3c-e28953b26746 and click valued at 0
[4696:4696:0708/174346.629933:VERBOSE1:confirmations.cc(61)] Confirming click for new_tab_page_ad with transaction id 3d861be9-d3a5-4724-8c0d-5ff043beade9 and creative instance id cf3743df-d357-4065-aa3c-e28953b26746

Verified 2nd click on the ad was blocked:

[4696:4696:0708/174635.677426:VERBOSE1:new_tab_page_ad.cc(129)] New tab page ad: Not allowed as already fired kClicked event for this placement id 6edebd11-c256-4d9d-a253-bd92630159d8
[4696:4696:0708/174635.679617:VERBOSE1:ads_impl.cc(906)] Failed to fire new tab page ad kClicked event for placement id 6edebd11-c256-4d9d-a253-bd92630159d8 and creative instance id cf3743df-d357-4065-aa3c-e28953b26746

Verified same ad with different placement id is processed properly:

[4696:4696:0708/174757.622842:VERBOSE3:new_tab_page_ad_event_clicked.cc(23)] Clicked new tab page ad with placement id b3a75bf9-0b15-4bd8-a203-2bb869b24e33 and creative instance id 02ad9c32-ccb3-4a8d-9dff-ede957d22f3b
[4696:4696:0708/174757.726959:VERBOSE6:new_tab_page_ad_event_clicked.cc(31)] Successfully logged new tab page ad clicked event

Promoted content ad

Was not tested as we don't use promoted content ads and we don't plan to.

Sanity check Notification ad

Verified ad is shown:

[4881:4881:0707/190727.429129:VERBOSE1:eligible_notification_ads_v1.cc(38)] Get eligible notification ads:
[4881:4881:0707/190727.434453:VERBOSE1:eligible_notification_ads_v1.cc(161)] Get eligible ads for untargeted segment
[4881:4881:0707/190727.438843:VERBOSE2:priority.h(33)] 1 ads with a priority of 1 in bucket 1
[4881:4881:0707/190727.439040:VERBOSE1:eligible_notification_ads_v1.cc(181)] 1 eligible ads out of 1 ads for untargeted segment
[4881:4881:0707/190727.439301:VERBOSE1:notification_ad_serving.cc(146)] Found 1 eligible ads
[4881:4881:0707/190727.439419:VERBOSE1:notification_ad_serving.cc(270)] Serving notification ad:
  placementId: 9daea30a-7bd1-45b1-8165-2809788e77b4
  creativeInstanceId: 4cda3ae7-1f70-4bca-b361-ca01d6a8f1ed
  creativeSetId: 5f8c4787-8431-49a5-9d09-bba40f8ad5f4
  campaignId: d1e25388-b362-4f30-bd4b-36b8205e59e5
  advertiserId: a34de75d-5654-4331-8713-8f4d4e2b6bf7
  segment: untargeted
  title: Vivamus sagittis lacus vel aug
  body: Duis mollis, est non commodo luctus, nisi erat porttitor lig
  targetUrl: https://www.apple.com/
[4881:4881:0707/190727.440497:VERBOSE1:ads_service_impl.cc(1989)] Timeout notification ad with placement id 9daea30a-7bd1-45b1-8165-2809788e77b4 in 120 seconds
[4881:4881:0707/190727.440617:VERBOSE3:notification_ad_event_served.cc(24)] Served notification ad with placement id 9daea30a-7bd1-45b1-8165-2809788e77b4 and creative instance id 4cda3ae7-1f70-4bca-b361-ca01d6a8f1ed
[4881:4881:0707/190727.440948:VERBOSE1:notification_ad_serving.cc(158)] Served notification ad
[4881:4881:0707/190727.457416:VERBOSE3:notification_ad_event_viewed.cc(24)] Viewed notification ad with placement id 9daea30a-7bd1-45b1-8165-2809788e77b4 and creative instance id 4cda3ae7-1f70-4bca-b361-ca01d6a8f1ed

Verified click event was processed:

[4881:4881:0707/190740.680157:VERBOSE3:notification_ad_event_clicked.cc(25)] Clicked notification ad with placement id 9daea30a-7bd1-45b1-8165-2809788e77b4 and creative instance id 4cda3ae7-1f70-4bca-b361-ca01d6a8f1ed

Verified ad click event is not blocked for 2nd ad

[6647:6647:0709/203340.482289:VERBOSE3:notification_ad_event_clicked.cc(25)] Clicked notification ad with placement id 703fe9cf-d911-49d8-9a37-d85d045adc34 and creative instance id 4cda3ae7-1f70-4bca-b361-ca01d6a8f1ed
[6647:6647:0709/203340.651485:VERBOSE1:notification_ad_event_clicked.cc(37)] Successfully logged notification ad clicked event
[6647:6647:0709/203340.658195:VERBOSE3:ads_impl.cc(804)] Successfully processed deposit for ad_notification with creative instance id 4cda3ae7-1f70-4bca-b361-ca01d6a8f1ed and click valued at 0
[6647:6647:0709/203340.658412:VERBOSE1:confirmations.cc(61)] Confirming click for ad_notification with transaction id b4f3697b-3191-427d-87a8-5b16c23a5c84 and creative instance id 4cda3ae7-1f70-4bca-b361-ca01d6a8f1ed

@tmancey tmancey added this to Ads Jun 10, 2024
@tmancey tmancey moved this to Done in Ads Jun 10, 2024
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.

2 participants