Skip to content

AdSense Alerts CTA should open site in new tab #11578

@jimmymadon

Description

@jimmymadon

Bug Description

After refactoring AdSense alerts, the target property coming from the server alert is not correctly mapped to the CTA button. This should be fixed.

Steps to reproduce

  1. Connect Site Kit and AdSense using a google account that is linked to an AdSense property that has some outstanding alert message.
  2. Click on the CTA button.
  3. The AdSense Admin dashboard opens in the same tab instead of a new tab.

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

Acceptance criteria

  • The target property coming from the Server Notification is correctly applied to the CTA of the Banner Notification.
  • In effect, clicking on the Go to AdSense CTA that appears on AdSense alerts navigates to the AdSense admin dashboard in a new tab.

Implementation Brief

  • In assets/js/components/Banner/CTAButton.js, add support for a new external prop as implemented in assets/js/components/Notice/CTAButton.js, including the trailing external icon functionality.
  • In assets/js/components/NotificationFromServer.js, if the ctaTarget property is _blank, then pass the external prop to ctaButton.

Test Coverage

  • Update VRTs but no other tests required.

QA Brief

  • Follow the steps to reproduce and verify that the AdSense CTA now opens the AdSense dashboard in a new tab.
  • Smoke test a few more Banner Notifications (e.g. Setup Banners like RRM / SiwG / Audience Segmentation + Gathering / Zero states) and Notice Notifications (any setup success notification for module / Site kit setup + any purple "new" notice like the "Auto updates CTA" that appears 10 mins after setting up new site using Site kit)

Changelog entry

  • AdSense alert links now open in a new tab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module: AdSenseGoogle AdSense module related issuesP1Medium priorityTeam SIssues for Squad 1Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions