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

[ads] Unify iOS search result attribution #33469

Closed
tmancey opened this issue Oct 6, 2023 · 1 comment · Fixed by brave/brave-core#21974
Closed

[ads] Unify iOS search result attribution #33469

tmancey opened this issue Oct 6, 2023 · 1 comment · Fixed by brave/brave-core#21974
Assignees
Labels
enhancement feature/ads OS/iOS Fixes related to iOS browser functionality priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass - iPhone QA/Yes release-notes/include

Comments

@tmancey
Copy link
Contributor

tmancey commented Oct 6, 2023

There is https://cdnjs.cloudflare.com/ajax/libs/jsonld/8.3.1/jsonld.js, which is from https://cdnjs.com/libraries/jsonld. The iOS code would call https://github.com/digitalbazaar/jsonld.js.

@tmancey tmancey added enhancement feature/ads OS/iOS Fixes related to iOS browser functionality labels Oct 6, 2023
@tmancey tmancey changed the title Implement Brave Ads search result attribution Implement Brave search result ad attribution Oct 6, 2023
@tmancey tmancey changed the title Implement Brave search result ad attribution Implement Brave search result ad attribution [iOS] Oct 11, 2023
@tmancey tmancey changed the title Implement Brave search result ad attribution [iOS] Unify Brave Ads iOS search result attribution Oct 21, 2023
@tmancey tmancey mentioned this issue Oct 24, 2023
3 tasks
@tmancey tmancey changed the title Unify Brave Ads iOS search result attribution [ads] Unify iOS search result attribution Oct 25, 2023
@tmancey tmancey self-assigned this Dec 5, 2023
@tmancey tmancey added priority/P3 The next thing for us to work on. It'll ride the trains. QA/Yes release-notes/exclude labels Dec 5, 2023
@tmancey tmancey assigned aseren and unassigned tmancey Dec 13, 2023
@brave-builds brave-builds added this to the 1.65.x - Nightly milestone Feb 23, 2024
@Uni-verse Uni-verse added QA/In-Progress Indicates that QA is currently in progress for that particular issue and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Apr 18, 2024
@btlechowski
Copy link

btlechowski commented Apr 19, 2024

Verified with 1.65.114 on iPhone 13 Pro Max

TestCase 1 - opted out - search ads enabled

Verified ad was served

debug	16:28:27.325447+0200	Client	[ads] Served search result ad with placement id f9098acf-7930-40a5-a8b1-57204637560c and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\

viewed

debug	16:28:27.327029+0200	Client	[ads] Viewed search result ad with placement id f9098acf-7930-40a5-a8b1-57204637560c and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\
debug	16:28:27.327060+0200	Client	[ads] Successfully processed deposit for search_result_ad with creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a and view valued at 0\
debug	16:28:27.327115+0200	Client	[ads] Confirming view for search_result_ad with transaction id 4d87e370-36a4-41cf-be3d-4d2c2d6add0f and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\

view confirmation

debug	16:28:32.329524+0200	Client	[ads] Redeem non-reward confirmation\
debug	16:28:32.329570+0200	Client	[ads] Create non-reward confirmation\
debug	16:28:32.329672+0200	Client	[ads] URL Request:\
  URL: https://search.anonymous.ads.bravesoftware.com/v3/confirmation/4d87e370-36a4-41cf-be3d-4d2c2d6add0f\
  Content: \{"creativeInstanceId":"bc876b1a-ca48-4eac-b445-efb9617ead4a","transactionId":"4d87e370-36a4-41cf-be3d-4d2c2d6add0f","type":"view"\}\
  Content Type: application/json\
  Method: kPost\
debug	16:28:33.404311+0200	Client	[ads] URL Response:\
  URL: https://search.anonymous.ads.bravesoftware.com/v3/confirmation/4d87e370-36a4-41cf-be3d-4d2c2d6add0f\
  Response Status Code: 418\
  Response: \{"id":"4d87e370-36a4-41cf-be3d-4d2c2d6add0f","payload":\{\},"type":"view","createdAt":"2024-04-19T14:28:33.243Z","modifiedAt":"2024-04-19T14:28:33.243Z","creativeInstanceId":"bc876b1a-ca48-4eac-b445-efb9617ead4a"\}\
debug	16:28:33.407113+0200	Client	[ads] Successfully redeemed non-reward view confirmation for search_result_ad with transaction id 4d87e370-36a4-41cf-be3d-4d2c2d6add0f and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\
debug	16:28:33.412276+0200	Client	[ads] Successfully processed view confirmation for search_result_ad with transaction id 4d87e370-36a4-41cf-be3d-4d2c2d6add0f and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\

click

debug	16:28:47.957287+0200	Client	[ads] Clicked search result ad with placement id f9098acf-7930-40a5-a8b1-57204637560c and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\
debug	16:28:47.957423+0200	Client	[ads] Successfully processed deposit for search_result_ad with creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a and click valued at 0\
debug	16:28:47.957453+0200	Client	[ads] Confirming click for search_result_ad with transaction id d4da2a56-ab88-485b-b6d6-39e9a83c3280 and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\
debug	16:28:47.959533+0200	Client	[ads] Successfully added click confirmation for search_result_ad with transaction id d4da2a56-ab88-485b-b6d6-39e9a83c3280 and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a to the queue\
debug	16:28:47.960398+0200	Client	[ads] Process click confirmation for search_result_ad with transaction id d4da2a56-ab88-485b-b6d6-39e9a83c3280 and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a in 0 godzin, 0 minut i 5 sekund at 16:28:52,959\

click confirmation

debug	16:28:52.961213+0200	Client	[ads] Redeem non-reward confirmation\
debug	16:28:52.961338+0200	Client	[ads] Create non-reward confirmation\
debug	16:28:52.961605+0200	Client	[ads] URL Request:\
  URL: https://search.anonymous.ads.bravesoftware.com/v3/confirmation/d4da2a56-ab88-485b-b6d6-39e9a83c3280\
  Content: \{"creativeInstanceId":"bc876b1a-ca48-4eac-b445-efb9617ead4a","transactionId":"d4da2a56-ab88-485b-b6d6-39e9a83c3280","type":"click"\}\
  Content Type: application/json\
  Method: kPost\
debug	16:28:53.775330+0200	Client	[ads] URL Response:\
  URL: https://search.anonymous.ads.bravesoftware.com/v3/confirmation/d4da2a56-ab88-485b-b6d6-39e9a83c3280\
  Response Status Code: 418\
  Response: \{"id":"d4da2a56-ab88-485b-b6d6-39e9a83c3280","payload":\{\},"type":"click","createdAt":"2024-04-19T14:28:53.612Z","modifiedAt":"2024-04-19T14:28:53.612Z","creativeInstanceId":"bc876b1a-ca48-4eac-b445-efb9617ead4a"\}\
debug	16:28:53.775639+0200	Client	[ads] Successfully redeemed non-reward click confirmation for search_result_ad with transaction id d4da2a56-ab88-485b-b6d6-39e9a83c3280 and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\
debug	16:28:53.781661+0200	Client	[ads] Successfully processed click confirmation for search_result_ad with transaction id d4da2a56-ab88-485b-b6d6-39e9a83c3280 and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\

landed

debug	16:29:00.330393+0200	Client	[ads] Landed on page for https://brave.com/brave-ads/?brave-creative-id=bc876b1a-ca48-4eac-b445-efb9617ead4a&key_param=itsnotbranded\
debug	16:29:00.330523+0200	Client	[ads] Successfully processed deposit for search_result_ad with creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a and landed valued at 0\
debug	16:29:00.330588+0200	Client	[ads] Confirming landed for search_result_ad with transaction id 42638a43-d7bf-43ba-b47e-55d717ab5e8b and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\
debug	16:29:00.334176+0200	Client	[ads] Successfully added landed confirmation for search_result_ad with transaction id 42638a43-d7bf-43ba-b47e-55d717ab5e8b and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a to the queue\
debug	16:29:00.335930+0200	Client	[ads] Process landed confirmation for search_result_ad with transaction id 42638a43-d7bf-43ba-b47e-55d717ab5e8b and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a in 0 godzin, 0 minut i 5 sekund at 16:29:05,334\

landed confirmation

debug	16:29:05.335848+0200	Client	[ads] Redeem non-reward confirmation\
debug	16:29:05.335998+0200	Client	[ads] Create non-reward confirmation\
debug	16:29:05.336357+0200	Client	[ads] URL Request:\
  URL: https://search.anonymous.ads.bravesoftware.com/v3/confirmation/42638a43-d7bf-43ba-b47e-55d717ab5e8b\
  Content: \{"creativeInstanceId":"bc876b1a-ca48-4eac-b445-efb9617ead4a","transactionId":"42638a43-d7bf-43ba-b47e-55d717ab5e8b","type":"landed"\}\
  Content Type: application/json\
  Method: kPost\
debug	16:29:06.264132+0200	Client	[ads] URL Response:\
  URL: https://search.anonymous.ads.bravesoftware.com/v3/confirmation/42638a43-d7bf-43ba-b47e-55d717ab5e8b\
  Response Status Code: 418\
  Response: \{"id":"42638a43-d7bf-43ba-b47e-55d717ab5e8b","payload":\{\},"type":"landed","createdAt":"2024-04-19T14:29:06.061Z","modifiedAt":"2024-04-19T14:29:06.061Z","creativeInstanceId":"bc876b1a-ca48-4eac-b445-efb9617ead4a"\}\
debug	16:29:06.264333+0200	Client	[ads] Successfully redeemed non-reward landed confirmation for search_result_ad with transaction id 42638a43-d7bf-43ba-b47e-55d717ab5e8b and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\
debug	16:29:06.272578+0200	Client	[ads] Successfully processed landed confirmation for search_result_ad with transaction id 42638a43-d7bf-43ba-b47e-55d717ab5e8b and creative instance id bc876b1a-ca48-4eac-b445-efb9617ead4a\

comversions

info	22:55:18.580827+0200	Client	[ads] Successfully processed click conversion for search_result_ad with creative instance id d50b6a8f-2fe3-49c6-a880-d4d6c3d51aa1, creative set id 43455468-667c-4425-b484-3b3cd55cd7ca, campaign id fd85f5b7-8c17-41bc-a3e5-a13259bcb25c and advertiser id 216c5e8c-434d-4c72-a9c5-3a11343dde48
info	22:55:18.581116+0200	Client	[ads] Successfully processed deposit for search_result_ad with creative instance id d50b6a8f-2fe3-49c6-a880-d4d6c3d51aa1 and conversion valued at 0
info	22:55:18.581235+0200	Client	[ads] Confirming conversion for search_result_ad with transaction id a1bece47-227b-4e22-9dea-5cebbf424f09 and creative instance id d50b6a8f-2fe3-49c6-a880-d4d6c3d51aa1
info	22:55:18.583298+0200	Client	[ads] Conversion queue is exhausted
info	22:55:18.584001+0200	Client	[ads] Successfully added conversion confirmation for search_result_ad with transaction id a1bece47-227b-4e22-9dea-5cebbf424f09 and creative instance id d50b6a8f-2fe3-49c6-a880-d4d6c3d51aa1 to the queue
info	22:55:18.584450+0200	Client	[ads] Process conversion confirmation for search_result_ad with transaction id a1bece47-227b-4e22-9dea-5cebbf424f09 and creative instance id d50b6a8f-2fe3-49c6-a880-d4d6c3d51aa1 in 0 godzin, 0 minut i 5 sekund at 22:55:23,582
info	22:55:23.584286+0200	Client	[ads] Redeem non-reward confirmation
info	22:55:23.584311+0200	Client	[ads] Create non-reward confirmation
info	22:55:23.584336+0200	Client	[ads] URL Request:
  URL: https://search.anonymous.ads.brave.com/v3/confirmation/a1bece47-227b-4e22-9dea-5cebbf424f09
  Content: {"conversion":[{"action":"click"}],"creativeInstanceId":"d50b6a8f-2fe3-49c6-a880-d4d6c3d51aa1","transactionId":"a1bece47-227b-4e22-9dea-5cebbf424f09","type":"conversion"}
  Content Type: application/json
  Method: kPost
info	22:55:24.047790+0200	Client	[ads] URL Response:
  URL: https://search.anonymous.ads.brave.com/v3/confirmation/a1bece47-227b-4e22-9dea-5cebbf424f09
  Response Status Code: 418
  Response: {"id":"a1bece47-227b-4e22-9dea-5cebbf424f09","payload":{},"type":"conversion","createdAt":"2024-04-19T20:55:45.043Z","modifiedAt":"2024-04-19T20:55:45.043Z","creativeInstanceId":"d50b6a8f-2fe3-49c6-a880-d4d6c3d51aa1"}
info	22:55:24.047815+0200	Client	[ads] Successfully redeemed non-reward conversion confirmation for search_result_ad with transaction id a1bece47-227b-4e22-9dea-5cebbf424f09 and creative instance id d50b6a8f-2fe3-49c6-a880-d4d6c3d51aa1
info	22:55:24.048547+0200	Client	[ads] Successfully processed conversion confirmation for search_result_ad with transaction id a1bece47-227b-4e22-9dea-5cebbf424f09 and creative instance id d50b6a8f-2fe3-49c6-a880-d4d6c3d51aa1

TestCase 2 - opted out - search ads disabled

Verified search result ad served event wasn't triggered
Verified search result ad viewed event wasn't triggered
Verified search result ad clicked event wasn't triggered

TestCase 3 - opted in

Verified search result ad served event wasn't triggered
Verified search result ad viewed event wasn't triggered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature/ads OS/iOS Fixes related to iOS browser functionality priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass - iPhone QA/Yes release-notes/include
Projects
Status: Done
5 participants