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

Add custom scripts for Verifiable Advertiser Conversions #15491

Closed
moritzhaller opened this issue Apr 25, 2021 · 7 comments · Fixed by brave/brave-core#8640
Closed

Add custom scripts for Verifiable Advertiser Conversions #15491

moritzhaller opened this issue Apr 25, 2021 · 7 comments · Fixed by brave/brave-core#8640
Assignees
Labels
enhancement feature/ads OS/Android Fixes related to Android browser functionality OS/Desktop 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 - Android ARM QA Pass - Android Tab QA Pass-Linux QA/Yes release-notes/exclude

Comments

@moritzhaller
Copy link

No description provided.

@moritzhaller moritzhaller self-assigned this Apr 25, 2021
@moritzhaller moritzhaller added enhancement feature/ads OS/Android Fixes related to Android browser functionality OS/iOS Fixes related to iOS browser functionality priority/P3 The next thing for us to work on. It'll ride the trains. QA/Yes release-notes/exclude labels Apr 25, 2021
@moritzhaller moritzhaller added this to the 1.25.x - Nightly milestone Apr 26, 2021
@srirambv
Copy link
Contributor

@moritzhaller can you please add a Test plan for the issue?

@moritzhaller
Copy link
Author

@srirambv we have a test plan with all the necessary files on the ticket now brave/brave-core#8640. Courtesy of @iambrianfung!

@srirambv

This comment has been minimized.

@btlechowski
Copy link

Changed the milestone to 1.26.x as the PR landed in 1.26.x and not 1.25.x.

@kjozwiak
Copy link
Member

@srirambv we'll need to check this again in 1.26.x as per the above. @moritzhaller confirmed that this change is only in 1.26.x via Slack.

@btlechowski
Copy link

Verification passed on

Brave 1.26.53 Chromium: 91.0.4472.77 (Official Build) beta (64-bit)
Revision 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#8640

VAC_URL

Verified conversions resource was loaded successfully

[18018:18018:0609/224204.363142:VERBOSE1:conversions_resource.cc(41)] Successfully loaded resource nnqccijfhvzwyrxpxwjrpmynaiazctqb
[18018:18018:0609/224204.363283:VERBOSE1:conversions_resource.cc(123)] Parsed verifiable conversion resource version �
[18018:18018:0609/224204.363410:VERBOSE1:conversions_resource.cc(51)] Successfully initialized resource nnqccijfhvzwyrxpxwjrpmynaiazctqb

Verified ad was shown

[18018:18018:0609/224443.443779:VERBOSE1:ad_notification_serving.cc(105)] Ad notification delivered:
  uuid: f693cde2-8eb2-4f85-8af1-e84c30d049ef
  creativeInstanceId: 6f5decfc-57cb-4a42-8523-e372c7d4adff
  creativeSetId: 57388e7d-e0fd-4f30-a76a-3d7fb2e6d8a1
  campaignId: ccdaf616-b8a8-481a-aa8b-caf5fb131353
  advertiserId: aa1d1cdb-ec45-42d4-86d0-ea353e1babd4
  segment: untargeted
  title: Click this ad to convert
  body: Verifiable conversions
  targetUrl: https://nytimes.com

Verified conversion was scheduled

[18018:18018:0609/224522.014383:VERBOSE1:conversions.cc(502)] Convert campaign id ccdaf616-b8a8-481a-aa8b-caf5fb131353, creative set id 57388e7d-e0fd-4f30-a76a-3d7fb2e6d8a1, creative instance id 6f5decfc-57cb-4a42-8523-e372c7d4adff and advertiser id aa1d1cdb-ec45-42d4-86d0-ea353e1babd4 in 0 hours, 8 minutes, 32 seconds at 10:53 PM

Verified conversion was successful

[18018:18018:0609/225353.987685:VERBOSE1:conversions.cc(443)] Successfully converted ad with campaign id ccdaf616-b8a8-481a-aa8b-caf5fb131353, creative set id 57388e7d-e0fd-4f30-a76a-3d7fb2e6d8a1, creative instance id 6f5decfc-57cb-4a42-8523-e372c7d4adff and advertiser id aa1d1cdb-ec45-42d4-86d0-ea353e1babd4 on Wednesday, June 9, 2021 at 10:53:53 PM

Verified conversionEnvelope was attached to confirmation

[18018:18018:0609/225353.992342:VERBOSE1:redeem_unblinded_token.cc(50)] Redeem unblinded token
[18018:18018:0609/225353.992479:VERBOSE1:redeem_unblinded_token.cc(64)] CreateConfirmation
[18018:18018:0609/225353.992652:VERBOSE2:redeem_unblinded_token.cc(65)] POST /v1/confirmation/{confirmation_id}/{credential}
[18018:18018:0609/225353.992722:VERBOSE5:redeem_unblinded_token.cc(69)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/5fee0131-fbb5-4f86-9444-87425ce2c4b4/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwibENQSFV0T1VReWxIZjkzRkFMYUxIYjhlTklNTy92Y2xNd0dUSnRjRUhGZz1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiYmV0YVwiLFwiY29udmVyc2lvbkVudmVsb3BlXCI6e1wiYWxnXCI6XCJjcnlwdG9fYm94X2N1cnZlMjU1MTl4c2Fsc2EyMHBvbHkxMzA1XCIsXCJjaXBoZXJ0ZXh0XCI6XCJUZFVKdWxyTlVZTHYxeWJndklhb2pLVlRUS3AwenFkU0hVc293YXBtV3BYckY5dnJHZTFSRHhZYVI2Smxmem0zXCIsXCJlcGtcIjpcIkwrVjlvMGZOWWtNVktOcXNYN3NwQnpELzlvU3Z4TS9DN1pDWlgxakxPM1E9XCIsXCJub25jZVwiOlwiRjkya1NtNUgwK1lXN2ZVSlFnU0JycVVtMnRla0xLYldcIn0sXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcIjZmNWRlY2ZjLTU3Y2ItNGE0Mi04NTIzLWUzNzJjN2Q0YWRmZlwiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcImxpbnV4XCIsXCJzdHVkaWVzXCI6W10sXCJ0eXBlXCI6XCJjb252ZXJzaW9uXCJ9Iiwic2lnbmF0dXJlIjoidXVTc0xXMXUzRS9rQkpudklrT2NxSFkwZ2czVkpWYjBBZnE0Q0VnYmFOdnZRSnA0VnovT3RWTkNDcGtFZzFxOFNMOEV5bGlLUktPSzlYTWNOSW43MGc9PSIsInQiOiJaQ1pIVk5hUVRIUzNzT2dZUlJMR2F0aDRkREZzVWFDcDVMcUl0ZFJCNVA2aWFlQVMzWlB6bysza0JrTVp6MFE4dDlkdXNhZThNQXVmMTRYQjJhRERNZz09In0=
  Content: {"blindedPaymentToken":"lCPHUtOUQylHf93FALaLHb8eNIMO/vclMwGTJtcEHFg=","buildChannel":"beta","conversionEnvelope":{"alg":"crypto_box_curve25519xsalsa20poly1305","ciphertext":"TdUJulrNUYLv1ybgvIaojKVTTKp0zqdSHUsowapmWpXrF9vrGe1RDxYaR6Jlfzm3","epk":"L+V9o0fNYkMVKNqsX7spBzD/9oSvxM/C7ZCZX1jLO3Q=","nonce":"F92kSm5H0+YW7fUJQgSBrqUm2tekLKbW"},"creativeInstanceId":"6f5decfc-57cb-4a42-8523-e372c7d4adff","payload":{},"platform":"linux","studies":[],"type":"conversion"}
  Content Type: application/json
  Method: POST
[18018:18018:0609/225353.994172:VERBOSE3:conversions.cc(412)] Successfully removed conversion from queue

image

VAC_DOM

Verified conversions resource was loaded successfully


[20849:20849:0609/234007.877926:VERBOSE1:conversions_resource.cc(41)] Successfully loaded resource nnqccijfhvzwyrxpxwjrpmynaiazctqb
[20849:20849:0609/234007.878029:VERBOSE1:conversions_resource.cc(123)] Parsed verifiable conversion resource version �
[20849:20849:0609/234007.878175:VERBOSE1:conversions_resource.cc(51)] Successfully initialized resource nnqccijfhvzwyrxpxwjrpmynaiazctqb


Verified ad was shown

[20849:20849:0609/234153.411029:VERBOSE1:ad_notification_serving.cc(105)] Ad notification delivered:
  uuid: 858b869c-5dd9-4149-a6b2-4847b39f48f7
  creativeInstanceId: 6f5decfc-57cb-4a42-8523-e372c7d4adff
  creativeSetId: 57388e7d-e0fd-4f30-a76a-3d7fb2e6d8a1
  campaignId: ccdaf616-b8a8-481a-aa8b-caf5fb131353
  advertiserId: aa1d1cdb-ec45-42d4-86d0-ea353e1babd4
  segment: untargeted
  title: Click this ad to convert
  body: Verifiable conversions
  targetUrl: http://localhost:8000/



Verified conversion was scheduled

[20849:20849:0609/234215.202553:VERBOSE1:conversions.cc(502)] Convert campaign id ccdaf616-b8a8-481a-aa8b-caf5fb131353, creative set id 57388e7d-e0fd-4f30-a76a-3d7fb2e6d8a1, creative instance id 6f5decfc-57cb-4a42-8523-e372c7d4adff and advertiser id aa1d1cdb-ec45-42d4-86d0-ea353e1babd4 in 0 hours, 2 minutes, 13 seconds at 11:44 PM

Verified conversion was successful

[20849:20849:0609/234428.167787:VERBOSE1:conversions.cc(443)] Successfully converted ad with campaign id ccdaf616-b8a8-481a-aa8b-caf5fb131353, creative set id 57388e7d-e0fd-4f30-a76a-3d7fb2e6d8a1, creative instance id 6f5decfc-57cb-4a42-8523-e372c7d4adff and advertiser id aa1d1cdb-ec45-42d4-86d0-ea353e1babd4 on Wednesday, June 9, 2021 at 11:44:28 PM

Verified conversionEnvelope was attached to confirmation

[20849:20849:0609/234428.173232:VERBOSE1:redeem_unblinded_token.cc(50)] Redeem unblinded token
[20849:20849:0609/234428.173312:VERBOSE1:redeem_unblinded_token.cc(64)] CreateConfirmation
[20849:20849:0609/234428.173353:VERBOSE2:redeem_unblinded_token.cc(65)] POST /v1/confirmation/{confirmation_id}/{credential}
[20849:20849:0609/234428.173404:VERBOSE5:redeem_unblinded_token.cc(69)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/66bef75f-36e2-4a25-95aa-7e474fc29ce3/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiVk15NSswcitsMEZ0Y3orekprN0VPQy95NzV0ckNZeDNUMmhIdmZYczBIVT1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiYmV0YVwiLFwiY29udmVyc2lvbkVudmVsb3BlXCI6e1wiYWxnXCI6XCJjcnlwdG9fYm94X2N1cnZlMjU1MTl4c2Fsc2EyMHBvbHkxMzA1XCIsXCJjaXBoZXJ0ZXh0XCI6XCJUSE1ZSmp6V1VJait6M0ptNVpyVjJ4R0JIVXVjQkNiZzVHR2UzUWp4aGN2ZWF1S0dSeEVSNDdvb2VNTTFpYmVLXCIsXCJlcGtcIjpcIkwrVjlvMGZOWWtNVktOcXNYN3NwQnpELzlvU3Z4TS9DN1pDWlgxakxPM1E9XCIsXCJub25jZVwiOlwiR1ZocEkrQWdrbGxzMW5aZFJwRlNvd0o4b25MNkQ5YVFcIn0sXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcIjZmNWRlY2ZjLTU3Y2ItNGE0Mi04NTIzLWUzNzJjN2Q0YWRmZlwiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcImxpbnV4XCIsXCJzdHVkaWVzXCI6W10sXCJ0eXBlXCI6XCJjb252ZXJzaW9uXCJ9Iiwic2lnbmF0dXJlIjoiMXZlRTR5WG5ha0FES1BQWjRVTkVwcWY0Z3Z3S05VZ0JHaEFUa0gwTVlRYVp3Q0hMRTNKak5ERXZJWWticTNuUmRDUmhzUVIwN3NJL0FaVjhUL3VSSkE9PSIsInQiOiJKQ1RKcU9IWGJMaEVUZUVqQmVDZjc3TlI0WkdJSTRMSmRlVUpMdVBMRElNVjdhcHdkb09zcUs1bjlwaW5SYVJ2eGR3Y280SmRPZEd5ak9uWnR6Q3FFZz09In0=
  Content: {"blindedPaymentToken":"VMy5+0r+l0Ftcz+zJk7EOC/y75trCYx3T2hHvfXs0HU=","buildChannel":"beta","conversionEnvelope":{"alg":"crypto_box_curve25519xsalsa20poly1305","ciphertext":"THMYJjzWUIj+z3Jm5ZrV2xGBHUucBCbg5GGe3QjxhcveauKGRxER47ooeMM1ibeK","epk":"L+V9o0fNYkMVKNqsX7spBzD/9oSvxM/C7ZCZX1jLO3Q=","nonce":"GVhpI+Agklls1nZdRpFSowJ8onL6D9aQ"},"creativeInstanceId":"6f5decfc-57cb-4a42-8523-e372c7d4adff","payload":{},"platform":"linux","studies":[],"type":"conversion"}


image

Logged #16303
Logged #16307

@btlechowski btlechowski added QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue QA/Test-All-Platforms labels Jun 10, 2021
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jun 15, 2021

Verification passed on Samsung Galaxy Tab with Android 10 running brave beta Bravemonoarm64_1.26.56.apk

###Native Ads

Confirmed ads work as expected
Confirmed ads stack up based on ads per hour setting
Confirmed able to dismiss Ad
Confirmed clicking on ad loads the landing page in a new tab
Confirmed all view/click/landed/dismiss events are logged correctly
Confirmed users are rewarded for viewing ads

Ad:

2021-06-15 16:33:40.209 9216-9216/? V/chromium: [VERBOSE1:ad_notification_serving.cc(105)] Ad notification delivered:
      uuid: 3200b762-2719-42f4-854b-663c20cdd1cd
      creativeInstanceId: f456412e-e2de-4ec1-b2ad-3cceb06235ff
      creativeSetId: 8be26e42-7945-4375-87e9-ca835a89964b
      campaignId: fc837a22-31f3-42e8-9497-4c282a081140
      advertiserId: 5d40e328-5cc3-471c-a4dd-bd888fa6dae8
      segment: personal finance
      title: Trade with AAX
      body: Enjoy a 20% discount on all crypto trades
      targetUrl: https://www.aaxpro.com/ad-sign-up?utm_source=brave&utm_medium=push_2&utm_campaign=brand&utm_content=trading_fee_discount

View event:

2021-06-15 16:33:41.331 9216-9216/? V/chromium: [VERBOSE1:confirmations.cc(248)] Successfully redeemed unblinded token with confirmation id 4a7a19ff-5726-4836-abc0-c92587874a6d, creative instance id f456412e-e2de-4ec1-b2ad-3cceb06235ff and view
2021-06-15 16:33:41.334 9216-9216/? V/chromium: [VERBOSE1:confirmations.cc(271)] Added 1 unblinded payment token with an estimated redemption value of 0.005 BAT, you now have 5 unblinded payment tokens

Click event:

2021-06-15 16:21:45.572 9216-9216/? V/chromium: [VERBOSE1:confirmations.cc(248)] Successfully redeemed unblinded token with confirmation id ac33cc16-6a58-4acb-978c-9d3d64217a46, creative instance id 9f9e78b0-c164-43c9-adcd-53ee3072c555 and click
2021-06-15 16:21:45.573 9216-9216/? V/chromium: [VERBOSE1:confirmations.cc(271)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 3 unblinded payment tokens

dismiss event

2021-06-15 16:33:45.116 9216-9216/? V/chromium: [VERBOSE1:confirmations.cc(248)] Successfully redeemed unblinded token with confirmation id d421697b-611d-416a-84c0-811604128741, creative instance id f456412e-e2de-4ec1-b2ad-3cceb06235ff and dismiss
2021-06-15 16:33:45.118 9216-9216/? V/chromium: [VERBOSE1:confirmations.cc(271)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 6 unblinded payment tokens

###Custom Ads
Custom ads testing is covered in #9592 (comment)


Verification passed on OnePlus 6T with Android 10 running 1.26.63

  • Verified ads show up as expected
  • Verified native ads are shown by default
  • Verified using command line args triggers custom ad notifications
  • Verified native ads stack up based on ads per hour settings
  • Verified custom ads don't stack up and are dismissed after 30 sec time out
  • Verified ad events are captured correctly
  • Verified ads are redeemed correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature/ads OS/Android Fixes related to Android browser functionality OS/Desktop 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 - Android ARM QA Pass - Android Tab QA Pass-Linux QA/Yes release-notes/exclude
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants