site-kit-wp: Keep ad blocker detection on AdSense screen until setup complete

Feature Description

  • When visiting the AdSense screen - until setup is complete - run the existing ad blocker checks and warn the user that setup cannot complete with an ad blocker enabled.

Details

Site Kit currently tries to help users who may be running an Ad Blocker by telling them to disable it before starting the AdSense setup flow:

image

image

The user may choose to ignore these warnings or only temporarily disable their ad blocker.

Once they activate AdSense if they visit the AdSense page, a warning also shows:

image

However, if they then disable their ad blocker and get part way thru the AdSense setup - for example, their account is detected but their site is pending approval (which can take days to complete), eg they get here:

image

Now, they return to their site a few days later to check the AdSense status, and their Ad blocker is on again. In this case, they will get blocked requests and the loader bar will display forever, Site Kit fails to detect the Ad Blocker is running. I am raising this issue because a user reported just this case, and was unable to complete AdSense setup - they did not realize their ad blocker was causing the issue.

Screen Recording 2020-06-11 at 11 07 AM

image

Instead, we should still be detecting the ad blocker and tell them to turn it off to complete the setup.

Note: detection is no longer needed once setup is complete - the calls to retrieve data work fine in my testing.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The ad blocker warning for AdSense should be displayed at all times during setup if an ad blocker is active.

Implementation Brief

  • In assets/js/modules/adsense/setup/setup-main.js remove the conditional check that determines whether the <AdBlockerWarning component is rendered to have it always render.
  • Merge #1699 1699

QA Brief

  • Confirm that at any step in the AdSense setup process, that the AdBlocker warning is shown when an ad blocker is enabled.

Changelog entry

  • Ensure ad blocker detection is active throughout the entire AdSense module setup.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

@aaemnnosttv Oh that makes sense. If this only happens because the ad blocker was enabled during page lifecycle, I think it’s not worth the effort. The main use-case for this detection is browsers that generally have an ad blocker active, to inform users they need to disable it. While you can turn an ad blocker on during page lifecycle, for the vast majority of cases checking on pageload will be sufficient because based on the URL ad blockers typically determine whether they should be disabled or not.

Let’s move this to Approval then.