Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Implement NTP-SI confirmations #3235

Closed
tmancey opened this issue Jan 25, 2021 · 3 comments · Fixed by #3325
Closed

Implement NTP-SI confirmations #3235

tmancey opened this issue Jan 25, 2021 · 3 comments · Fixed by #3325

Comments

@tmancey
Copy link
Collaborator

tmancey commented Jan 25, 2021

Confirm NTP views and clicks so that users are rewarded for NTP sponsored images. See #3234 as we need to pass the creative_instance_id from the CRX changes.

This work is in branch brave-core.1.16.x-ntp-si-confirmations

@kylehickinson
Copy link
Collaborator

As discussed, currently implementation is incomplete, requires updates to JSON parsing

@tmancey
Copy link
Collaborator Author

tmancey commented Feb 3, 2021

@kylehickinson I have upgrade the JSON parsing to reflect the new photo.json format for NTP sponsored images, can you please review brave-core.1.16.x-ntp-si-confirmations.

@LaurenWags
Copy link
Member

LaurenWags commented Mar 29, 2021

Verified on iPad mini with iOS 13 running 1.24 (21.3.25.18)

All of the below was confirmed with a clean install of 1.24 (21.3.25.18).

Confirmed view, click, landed confirmations for NTP SI.

Log info

View

[Debug] [BraveRewards] [new_tab_page_ad_event_viewed.cc:24] > Viewed new tab page ad with uuid 37E3F78A-33F5-4DF5-BEBA-73F65F19E8C4 and creative instance id 00299a52-7a7e-42db-9308-bf962956fa09
.........
[Debug] [BraveRewards] [new_tab_page_ad_event_viewed.cc:33] > Successfully logged new tab page ad viewed event
.........
[Info] [BraveRewards] [confirmations.cc:224] > Successfully redeemed unblinded token with confirmation id 6c9402df-711a-4f9a-8055-8b0bb26f507f, creative instance id 00299a52-7a7e-42db-9308-bf962956fa09 and view

Clicked

[Debug] [BraveRewards] [new_tab_page_ad_event_clicked.cc:25] > Clicked new tab page ad with uuid 37E3F78A-33F5-4DF5-BEBA-73F65F19E8C4 and creative instance id 00299a52-7a7e-42db-9308-bf962956fa09
..........
[Debug] [BraveRewards] [new_tab_page_ad_event_clicked.cc:34] > Successfully logged new tab page ad clicked event
..........
[Info] [BraveRewards] [confirmations.cc:224] > Successfully redeemed unblinded token with confirmation id 4f49d0fd-539a-4de5-9df3-e3278a70cdc6, creative instance id 00299a52-7a7e-42db-9308-bf962956fa09 and click

Landed

[Info] [BraveRewards] [confirmations.cc:90] > Confirming landed ad for creative instance id 00299a52-7a7e-42db-9308-bf962956fa09
.........
[Info] [BraveRewards] [confirmations.cc:224] > Successfully redeemed unblinded token with confirmation id 0d3b3ccd-8321-4cb4-a258-abb9c3c7c4f8, creative instance id 00299a52-7a7e-42db-9308-bf962956fa09 and landed

Confirmed max of 4 rewarded NTP SI views/hr.

Log info
[Debug] [BraveRewards] [permission_rule_util.cc:24] > You have exceeded the allowed new tab page ads per hour
[Info] [BraveRewards] [new_tab_page_ad.cc:126] > New tab page ad: Not allowed

Confirmed max of 20 rewarded NTP SI views/day.

Log info
[Debug] [BraveRewards] [permission_rule_util.cc:24] > You have exceeded the allowed new tab page ads per day
[Info] [BraveRewards] [new_tab_page_ad.cc:126] > New tab page ad: Not allowed

Confirmed clicking NTP ad logo opens the target URL.
Confirmed NTP SI appear if Rewards are not enabled.
Confirmed users are not rewarded for viewing NTP ads if ads is disabled. Confirmed no log messages for ad confirmations in this case.
Confirmed able to turn off NTP SI and it did not appear. Confirmed no log messages for ad confirmations in this case.

Checks of ad notifications were performed under #3404 (comment).

Upgrade case behaves as discussed under https://bravesoftware.slack.com/archives/C06UXF3KJ/p1617021517155400?thread_ts=1616781926.142700&cid=C06UXF3KJ


Verified on iPhone 7 with iOS 14 running 1.24 (21.3.31.15)

All of the below was confirmed with a clean install of 1.24.

Confirmed view, click, landed confirmations for NTP SI.

Log info

View

[Debug] [BraveRewards] [new_tab_page_ad_event_viewed.cc:24] > Viewed new tab page ad with uuid B409BE7D-5197-419A-A15A-B2C728DE39E0 and creative instance id 6eef4b9b-99ac-401e-9aa0-3ab70d6f8744
.........
[Debug] [BraveRewards] [new_tab_page_ad_event_viewed.cc:33] > Successfully logged new tab page ad viewed event
.........
[Info] [BraveRewards] [confirmations.cc:224] > Successfully redeemed unblinded token with confirmation id 1aaa6860-eab5-479f-9a08-7da3d0be98e0, creative instance id 6eef4b9b-99ac-401e-9aa0-3ab70d6f8744 and view

Clicked

[Debug] [BraveRewards] [new_tab_page_ad_event_clicked.cc:25] > Clicked new tab page ad with uuid B409BE7D-5197-419A-A15A-B2C728DE39E0 and creative instance id 6eef4b9b-99ac-401e-9aa0-3ab70d6f8744
..........
[Debug] [BraveRewards] [new_tab_page_ad_event_clicked.cc:34] > Successfully logged new tab page ad clicked event
..........
[Info] [BraveRewards] [confirmations.cc:224] > Successfully redeemed unblinded token with confirmation id ba523885-de8e-4d5e-9a0d-9058eff5f100, creative instance id 6eef4b9b-99ac-401e-9aa0-3ab70d6f8744 and click

Landed

[Info] [BraveRewards] [confirmations.cc:90] > Confirming landed ad for creative instance id 6eef4b9b-99ac-401e-9aa0-3ab70d6f8744
.........
[Info] [BraveRewards] [confirmations.cc:224] > Successfully redeemed unblinded token with confirmation id 1e145ede-cb8e-4c94-8b79-c10f19285d56, creative instance id 6eef4b9b-99ac-401e-9aa0-3ab70d6f8744 and landed

Confirmed max of 4 rewarded NTP SI views/hr.

Log info
[Debug] [BraveRewards] [permission_rule_util.cc:24] > You have exceeded the allowed new tab page ads per hour
[Info] [BraveRewards] [new_tab_page_ad.cc:126] > New tab page ad: Not allowed

Confirmed clicking NTP ad logo opens the target URL.
Confirmed NTP SI appear if Rewards are not enabled.
Confirmed users are not rewarded for viewing NTP ads if ads is disabled. Confirmed no log messages for ad confirmations in this case.
Confirmed able to turn off NTP SI and it did not appear. Confirmed no log messages for ad confirmations in this case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants