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

No landed Brave Ads confirmation in confirmations.json when focusing an already opened tab - follow up to 5195 #5949

Closed
LaurenWags opened this issue Sep 9, 2019 · 1 comment · Fixed by brave/brave-core#7358

Comments

@LaurenWags
Copy link
Member

Description

Follow up to #5195

While testing above issue, @GeetaSarvadnya noticed that she's not getting landed in confirmations.json when navigated to an opened tab. Per discussion with @jsecretan we probably should be getting a landed confirmation here (assuming criteria are met).

Steps to Reproduce

  1. Browse such that you get Ads and open each one you get.
  2. When you get the same ad, and you open it, if there is already a tab opened for it, that tab is focused (a new tab is not opened).
  3. Look at your confirmations.json / logs if you launched with them. You have another view and another click confirmation for this duplicate ad.

Actual result:

no landed confirmation in confirmations.json when an existing tab is focused.

Expected result:

landed confirmation for duplicate ad.

Reproduces how often:

easily

Brave version (brave://version info)

Brave 0.69.124 Chromium: 76.0.3809.132 (Official Build) (64-bit)
Revision fd1acc410994a7a68ac25bc77513d443f3130860-refs/branch-heads/3809@{#1035}
OS Mac OS X

Version/Channel Information:

  • Can you reproduce this issue with the current release? n/a on 0.68.x, yes on 0.69.x
  • Can you reproduce this issue with the beta channel? unsure, probably yes
  • Can you reproduce this issue with the dev channel? unsure, probably yes
  • Can you reproduce this issue with the nightly channel? unsure, probably yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? n/a
  • Does the issue resolve itself when disabling Brave Rewards? n/a
  • Is the issue reproducible on the latest version of Chrome? n/a

Miscellaneous Information:

cc @tmancey

@jsecretan jsecretan added the priority/P5 Not scheduled. Don't anticipate work on this any time soon. label Nov 21, 2019
@tmancey tmancey changed the title no landed confirmation in confirmations.json when focusing an already opened tab - follow up to 5195 No landed Brave Ads confirmation in confirmations.json when focusing an already opened tab - follow up to 5195 Jan 20, 2020
@tmancey tmancey added bug and removed QA/Test-Plan-Specified QA/Yes priority/P5 Not scheduled. Don't anticipate work on this any time soon. labels Jan 20, 2020
@tmancey tmancey added OS/Android Fixes related to Android browser functionality OS/Desktop labels Aug 5, 2020
@tmancey tmancey removed the OS/Android Fixes related to Android browser functionality label Aug 20, 2020
@srirambv srirambv changed the title No landed Brave Ads confirmation in confirmations.json when focusing an already opened tab - follow up to 5195 [Desktop] No landed Brave Ads confirmation in confirmations.json when focusing an already opened tab - follow up to 5195 Sep 9, 2020
@tmancey tmancey changed the title [Desktop] No landed Brave Ads confirmation in confirmations.json when focusing an already opened tab - follow up to 5195 No landed Brave Ads confirmation in confirmations.json when focusing an already opened tab - follow up to 5195 Dec 5, 2020
@stephendonner
Copy link

stephendonner commented Jan 28, 2021

Verified FIXED using

Brave 1.20.90 Chromium: 88.0.4324.96 (Official Build) dev (x86_64)
Revision 68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS macOS Version 11.1 (Build 20C69)

Steps:

  1. launched Dev using staging rewards + ads endpoints: --args --enable-logging=stderr --vmodule="*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=6,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=5
  2. opened tab with msn.com (far left)
  3. opened facebook.com (right)
  4. viewed and clicked on "This is a test" ad for brave.com, which opened and focused a new tab with brave.com, to the right of facebook.com
  5. navigated back to facebook.com tab (now focused, in middle, with msn.com on left and brave.com on right) and waited
  6. received another "This is a test" ad, which I viewed, and clicked on it
  7. the tab with brave.com took focus (right-most tab), and in the confirmations.json file I see:
"transaction_history": {
    "transactions": [
      {
        "confirmation_type": "view",
        "estimated_redemption_value": 0.01,
        "timestamp_in_seconds": "1611797608"
      },
      {
        "confirmation_type": "click",
        "estimated_redemption_value": 0.0,
        "timestamp_in_seconds": "1611797611"
      },
      {
        "confirmation_type": "view",
        "estimated_redemption_value": 0.025,
        "timestamp_in_seconds": "1611798345"
      },
      {
        "confirmation_type": "click",
        "estimated_redemption_value": 0.0,
        "timestamp_in_seconds": "1611798383"
      },
      {
        "confirmation_type": "landed",
        "estimated_redemption_value": 0.0,
        "timestamp_in_seconds": "1611798393"
      }
    ]

Verification passed on

Brave | 1.20.84 Chromium: 88.0.4324.96 (Official Build) dev (64-bit)
-- | --
Revision | 68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS | Windows 10 OS Version 2004 (Build 19041.746)

  • Verified the STR from the description and ensured that landed confirmations events are recorded in the logs when the same Ad is seen twice and click on the 2nd Ad focused already opened Ads landing page.

1st Ad:

[10960:22480:0201/210206.690:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id 9cb898c1-bd8e-4287-b7f3-1715909138b0, creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4 and view
[10960:22480:0201/210206.697:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0.025 BAT, you now have 1 unblinded payment tokens

[10960:22480:0201/210207.961:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id d21e687c-bb9f-43d7-a2fb-66b2dbbae99f, creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4 and click
[10960:22480:0201/210207.962:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 2 unblinded payment tokens

[10960:22480:0201/210225.349:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id 405bd8ae-62c7-481b-8b41-f453190903c2, creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4 and landed
[10960:22480:0201/210225.350:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 3 unblinded payment tokens

2nd Ad

[3104:16656:0201/212304.991:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id fa2f4553-62dc-46a7-805b-7e0f6a6adf73, creative instance id 30ecd70f-f56d-4745-a457-4035fcab54b6 and view
[3104:16656:0201/212304.999:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0.025 BAT, you now have 4 unblinded payment tokens

[3104:16656:0201/212310.430:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id 10045d05-2b38-449b-90cb-1b452fca4365, creative instance id 30ecd70f-f56d-4745-a457-4035fcab54b6 and click
[3104:16656:0201/212310.431:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 5 unblinded payment tokens

[3104:16656:0201/212322.331:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id 075e1f7b-25c0-43e7-9a7e-cf441d95a795, creative instance id 30ecd70f-f56d-4745-a457-4035fcab54b6 and landed
[3104:16656:0201/212322.338:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 6 unblinded payment tokens


Verification passed on

Brave 1.20.95 Chromium: 88.0.4324.96 (Official Build) beta (64-bit)
Revision 68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS Ubuntu 18.04 LTS
  • Verified the STR from the description and ensured that landed confirmations events are recorded in the logs when the same Ad is seen twice and click on the 2nd Ad focused already opened Ads landing page.
    Ad 1
[4348:4348:0202/135813.827863:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id 8dfd203f-0b3c-4328-a132-f7648fe531fc, creative instance id 4983dc92-09fd-4e5c-94c3-616a4728c1d9 and view
[4348:4348:0202/135813.828462:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0.01 BAT, you now have 1 unblinded payment tokens

[4348:4348:0202/135815.637523:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id 8e7a23cc-79ff-4256-8026-fc148591342b, creative instance id 4983dc92-09fd-4e5c-94c3-616a4728c1d9 and click
[4348:4348:0202/135815.637735:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 2 unblinded payment tokens

[4348:4348:0202/135831.604921:VERBOSE1:ad_transfer.cc(140)] Transferred ad for https://www.brave.com/
[4348:4348:0202/135831.605036:VERBOSE1:confirmations.cc(90)] Confirming landed ad for creative instance id 4983dc92-09fd-4e5c-94c3-616a4728c1d9
[4348:4348:0202/135832.697621:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id ac4cdf45-191f-4c2f-bcb3-e09d0e4288e6, creative instance id 4983dc92-09fd-4e5c-94c3-616a4728c1d9 and landed
[4348:4348:0202/135832.698541:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 3 unblinded payment tokens

Ad 2

[4995:4995:0202/142120.745647:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id 2c5301e7-767c-437f-b6a5-3e3e71a846cf, creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4 and view
[4995:4995:0202/142120.746305:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0.025 BAT, you now have 4 unblinded payment tokens

[4995:4995:0202/142132.741719:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id 9fb34792-dfe3-492e-a0e1-95d47f30b439, creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4 and click
[4995:4995:0202/142132.742419:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 1 unblinded payment tokens

[4995:4995:0202/142144.574296:VERBOSE1:ad_transfer.cc(140)] Transferred ad for https://www.brave.com/
[4995:4995:0202/142144.574453:VERBOSE1:confirmations.cc(90)] Confirming landed ad for creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4
[4995:4995:0202/142146.235707:VERBOSE1:confirmations.cc(224)] Successfully redeemed unblinded token with confirmation id 002c3966-c615-4079-a45f-8ca964bc44d1, creative instance id ed6c467a-8643-42eb-a7cd-32e878fa3cd4 and landed
[4995:4995:0202/142146.236585:VERBOSE1:confirmations.cc(245)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 2 unblinded payment tokens


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