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

Promoted content ads view event is not triggered for small window sizes #14420

Closed
btlechowski opened this issue Mar 1, 2021 · 3 comments · Fixed by brave/brave-core#9327 or brave/brave-core#9599

Comments

@btlechowski
Copy link

btlechowski commented Mar 1, 2021

Follow up to: #13695 and #13468

The user will not be rewarded for watching the ad.

In order for the events to be triggered full ad has to be shown. For small windows size or even screen sizes(1366x768) this may not be possible.

It also could happen that the user clicks on the ad, and gets click, but not view event.

Steps to Reproduce

  1. Clean profile
  2. Run Brave in US locale with ads staging server and dev feed server
  3. Make the Window smaller than Promoted Content Ad
  4. View a Promoted Content Ad
  5. Check the logs for Viewed promoted content ad

Note: zoom out the page to trigger the view event

Actual result:

Viewed promoted content ad is never triggered

View port size:
image

Expected result:

Viewed promoted content ad is triggered

Reproduces how often:

100% repro rate

Brave version (brave://version info)

Brave 1.21.70 Chromium: 89.0.4389.69 (Official Build) (64-bit)
Revision 6df9174a477a0bea2118cb4669954d517be16104-refs/branch-heads/4389@{#1332}
OS Ubuntu 18.04 LTS

cc @brave/legacy_qa @tmancey @petemill @jsecretan

@btlechowski btlechowski changed the title ads view event is not triggered for small window sizes Promoted content ads view event is not triggered for small window sizes Mar 1, 2021
@btlechowski
Copy link
Author

btlechowski commented Mar 25, 2021

Adding @mattmcalister to the conversation.

@btlechowski
Copy link
Author

Still reproducible

Brave 1.27.108 Chromium: 92.0.4515.107 (Official Build) (64-bit)
Revision 87a818b10553a07434ea9e2b6dccf3cbe7895134-refs/branch-heads/4515@{#1634}
OS Ubuntu 18.04 LTS

@btlechowski
Copy link
Author

Verification passed on

Brave 1.29.42 Chromium: 92.0.4515.115 (Official Build) nightly (64-bit)
Revision 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS Ubuntu 18.04 LTS

Verified test plan from the description. Ad was marked as view even for small viewports
Example:
image

Verified view event was triggered

[3056:3056:0802/182711.679458:VERBOSE3:promoted_content_ad_event_served.cc(24)] Served promoted content ad with uuid 83fa2de6f358ecbcc8f7d810df38982d89a849aef18d5027456e4ee41b3b9910 and creative instance id 40a69fa9-3814-4ec4-bee8-a176c8fb4690
[3056:3056:0802/182711.680601:VERBOSE3:promoted_content_ad_event_viewed.cc(24)] Viewed promoted content ad with uuid 83fa2de6f358ecbcc8f7d810df38982d89a849aef18d5027456e4ee41b3b9910 and creative instance id 40a69fa9-3814-4ec4-bee8-a176c8fb4690
[3056:3056:0802/182711.680807:VERBOSE1:confirmations.cc(90)] Confirming view ad for creative instance id 40a69fa9-3814-4ec4-bee8-a176c8fb4690
[3056:3056:0802/182711.682719:VERBOSE1:redeem_unblinded_token.cc(50)] Redeem unblinded token
[3056:3056:0802/182711.683035:VERBOSE1:redeem_unblinded_token.cc(64)] CreateConfirmation
[3056:3056:0802/182711.683138:VERBOSE2:redeem_unblinded_token.cc(65)] POST /v1/confirmation/{confirmation_id}/{credential}
[3056:3056:0802/182711.683228:VERBOSE5:redeem_unblinded_token.cc(69)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/44a5e594-a44f-45e8-94be-7dde1859230c/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiZG9EL292SVJSMHg2anR3S3lURExzNmtQWnlua3VFd29WQzY4TWM3M2pYTT1cIixcImJ1aWxkQ2hhbm5lbFwiOlwibmlnaHRseVwiLFwiY3JlYXRpdmVJbnN0YW5jZUlkXCI6XCI0MGE2OWZhOS0zODE0LTRlYzQtYmVlOC1hMTc2YzhmYjQ2OTBcIixcInBheWxvYWRcIjp7fSxcInBsYXRmb3JtXCI6XCJsaW51eFwiLFwic3R1ZGllc1wiOltdLFwidHlwZVwiOlwidmlld1wifSIsInNpZ25hdHVyZSI6IkhRVlEvYVkwR2ZESmhxUFEvdUZuZkVNb1lSR21Db04vTFZrRzRCSTlwRkQvKytFQXFNdDlZd2lkL3Ryc2VxZnVsNGl0Y0lqajZnejNJVWpFM01rM01nPT0iLCJ0IjoienczQ200Z3BJZE5aY0xBdTN5UVhuMS9pMkFqKytOd0xMQk5WZHR6SWgwRVRLRUR0Z0lKQ1cyei9odzBNZm5wTmhyb2NuOW1xQ0pJbU8yOHpycWZjanc9PSJ9
  Content: {"blindedPaymentToken":"doD/ovIRR0x6jtwKyTDLs6kPZynkuEwoVC68Mc73jXM=","buildChannel":"nightly","creativeInstanceId":"40a69fa9-3814-4ec4-bee8-a176c8fb4690","payload":{},"platform":"linux","studies":[],"type":"view"}
  Content Type: application/json
  Method: POST
[3056:3056:0802/182711.691138:VERBOSE6:promoted_content_ad_event_served.cc(32)] Successfully logged promoted content ad served event
[3056:3056:0802/182711.701482:VERBOSE6:promoted_content_ad_event_viewed.cc(32)] Successfully logged promoted content ad viewed event

Verified user was paid for it:

[3056:3056:0802/182711.680807:VERBOSE1:confirmations.cc(90)] Confirming view ad for creative instance id 40a69fa9-3814-4ec4-bee8-a176c8fb4690
[3056:3056:0802/182711.682719:VERBOSE1:redeem_unblinded_token.cc(50)] Redeem unblinded token
[3056:3056:0802/182711.683035:VERBOSE1:redeem_unblinded_token.cc(64)] CreateConfirmation
[3056:3056:0802/182711.683138:VERBOSE2:redeem_unblinded_token.cc(65)] POST /v1/confirmation/{confirmation_id}/{credential}
[3056:3056:0802/182711.683228:VERBOSE5:redeem_unblinded_token.cc(69)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/44a5e594-a44f-45e8-94be-7dde1859230c/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiZG9EL292SVJSMHg2anR3S3lURExzNmtQWnlua3VFd29WQzY4TWM3M2pYTT1cIixcImJ1aWxkQ2hhbm5lbFwiOlwibmlnaHRseVwiLFwiY3JlYXRpdmVJbnN0YW5jZUlkXCI6XCI0MGE2OWZhOS0zODE0LTRlYzQtYmVlOC1hMTc2YzhmYjQ2OTBcIixcInBheWxvYWRcIjp7fSxcInBsYXRmb3JtXCI6XCJsaW51eFwiLFwic3R1ZGllc1wiOltdLFwidHlwZVwiOlwidmlld1wifSIsInNpZ25hdHVyZSI6IkhRVlEvYVkwR2ZESmhxUFEvdUZuZkVNb1lSR21Db04vTFZrRzRCSTlwRkQvKytFQXFNdDlZd2lkL3Ryc2VxZnVsNGl0Y0lqajZnejNJVWpFM01rM01nPT0iLCJ0IjoienczQ200Z3BJZE5aY0xBdTN5UVhuMS9pMkFqKytOd0xMQk5WZHR6SWgwRVRLRUR0Z0lKQ1cyei9odzBNZm5wTmhyb2NuOW1xQ0pJbU8yOHpycWZjanc9PSJ9
  Content: {"blindedPaymentToken":"doD/ovIRR0x6jtwKyTDLs6kPZynkuEwoVC68Mc73jXM=","buildChannel":"nightly","creativeInstanceId":"40a69fa9-3814-4ec4-bee8-a176c8fb4690","payload":{},"platform":"linux","studies":[],"type":"view"}
  Content Type: application/json
  Method: POST
[3056:3056:0802/182711.691138:VERBOSE6:promoted_content_ad_event_served.cc(32)] Successfully logged promoted content ad served event
[3056:3056:0802/182711.701482:VERBOSE6:promoted_content_ad_event_viewed.cc(32)] Successfully logged promoted content ad viewed event
[3056:3056:0802/182712.319250:VERBOSE1:redeem_unblinded_token.cc(82)] OnCreateConfirmation
[3056:3056:0802/182712.319287:VERBOSE6:redeem_unblinded_token.cc(84)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/44a5e594-a44f-45e8-94be-7dde1859230c/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiZG9EL292SVJSMHg2anR3S3lURExzNmtQWnlua3VFd29WQzY4TWM3M2pYTT1cIixcImJ1aWxkQ2hhbm5lbFwiOlwibmlnaHRseVwiLFwiY3JlYXRpdmVJbnN0YW5jZUlkXCI6XCI0MGE2OWZhOS0zODE0LTRlYzQtYmVlOC1hMTc2YzhmYjQ2OTBcIixcInBheWxvYWRcIjp7fSxcInBsYXRmb3JtXCI6XCJsaW51eFwiLFwic3R1ZGllc1wiOltdLFwidHlwZVwiOlwidmlld1wifSIsInNpZ25hdHVyZSI6IkhRVlEvYVkwR2ZESmhxUFEvdUZuZkVNb1lSR21Db04vTFZrRzRCSTlwRkQvKytFQXFNdDlZd2lkL3Ryc2VxZnVsNGl0Y0lqajZnejNJVWpFM01rM01nPT0iLCJ0IjoienczQ200Z3BJZE5aY0xBdTN5UVhuMS9pMkFqKytOd0xMQk5WZHR6SWgwRVRLRUR0Z0lKQ1cyei9odzBNZm5wTmhyb2NuOW1xQ0pJbU8yOHpycWZjanc9PSJ9
  Response Status Code: 201
  Response: {"id":"44a5e594-a44f-45e8-94be-7dde1859230c","payload":{},"createdAt":"2021-08-02T16:27:13.005Z","type":"view","modifiedAt":"2021-08-02T16:27:13.005Z","creativeInstanceId":"40a69fa9-3814-4ec4-bee8-a176c8fb4690"}
[3056:3056:0802/182712.319508:VERBOSE1:redeem_unblinded_token.cc(112)] FetchPaymentToken
[3056:3056:0802/182712.319557:VERBOSE2:redeem_unblinded_token.cc(113)] GET /v1/confirmation/{confirmation_id}/paymentToken
[3056:3056:0802/182712.319589:VERBOSE5:redeem_unblinded_token.cc(117)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/44a5e594-a44f-45e8-94be-7dde1859230c/paymentToken
  Method: GET
[3056:3056:0802/182712.896305:VERBOSE1:redeem_unblinded_token.cc(128)] OnFetchPaymentToken
[3056:3056:0802/182712.896347:VERBOSE6:redeem_unblinded_token.cc(130)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/44a5e594-a44f-45e8-94be-7dde1859230c/paymentToken
  Response Status Code: 200
  Response: {"id":"44a5e594-a44f-45e8-94be-7dde1859230c","createdAt":"2021-08-02T16:27:13.005Z","type":"view","modifiedAt":"2021-08-02T16:27:13.037Z","creativeInstanceId":"40a69fa9-3814-4ec4-bee8-a176c8fb4690","paymentToken":{"publicKey":"CrQLMWmUuYog6Q93nScS8Lo1HHSex8WM2Qxij7qhjkQ=","batchProof":"566pD4fa57tqwPQCwYX2BOhmc9JlVF/rX9A0fZ6xvwyei3JUWr/4wFsQVxF/ZzN4wWA9FCW6059Q9iEYTYLTBw==","signedTokens":["/B+zESc2mIvZ805NylQA+/9t3s3WWtuP9I387uevBEs="]}}
[3056:3056:0802/182712.897521:VERBOSE1:confirmations.cc(250)] Successfully redeemed unblinded token with confirmation id 44a5e594-a44f-45e8-94be-7dde1859230c, creative instance id 40a69fa9-3814-4ec4-bee8-a176c8fb4690 and view
[3056:3056:0802/182712.898009:VERBOSE1:confirmations.cc(273)] Added 1 unblinded payment token with an estimated redemption value of 0.025 BAT, you now have 1 unblinded payment tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment