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

Show warning when user with existing GfW ads account tries to enter same ID in Ads module manual setup #10257

Closed
12 tasks done
zutigrm opened this issue Feb 21, 2025 · 3 comments
Closed
12 tasks done
Labels
P0 High priority Team S Issues for Squad 1 Type: Enhancement Improvement of an existing feature

Comments

@zutigrm
Copy link
Collaborator

zutigrm commented Feb 21, 2025

Feature Description

Based on the latest update in Figma when user, who has existing GfW active and connected Ads ID, tries to input same ID manually during the Ads setup, we should show warning and disable the button as shown in the referenced design


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

Acceptance criteria

  • When use tries to add Ads ID, in the manual setup form, that is also connected in Google for WooCommerce plugin new notice is shown bellow the field and complete setup CTA is disabled

Implementation Brief

We need to extract the tag ID from GfW, Evan checked the option, and The tag ID that is put into gtag on the frontend is from the ads_conversion_action option, which is an array that has the tag under conversion_id . See \Automattic\WooCommerce\GoogleListingsAndAds\Google\GlobalSiteTag. This should be exposed in the inline data and retrieved by the selector

  • Within the ads PAX setup form component at assets/js/modules/ads/components/setup/SetupFormPAX.js
    • Import the <WarningNotice> component from components, this will be used to render the warning should the input Ads ID be equal to that of the stored/connected Google for WooCommerce one
    • Define a new const, say currentConversionID and store the value if the existing Ads selector, getConversionID(). This value is updated in real time as the user is entering the ID into the text field.
    • Define a new const, say glaConnectedAdsId and store the value of the existing connected Google for WooCommerce Ads ID, if it exists, using the new selector created in Expose GLA conversion ID in the Ads datastore #10274
    • Define a new const, say isDuplicateAdsIdDetected and store a boolean value, checking whether the above two ID's are identical
    • Update the disabled prop condition attached to the <SpinnerButton> component to also include a check for the newly created isDuplicateAdsIdDetected constant, i.e disabled={ ! canSubmitChanges || isSaving || isDuplicateAdsIdDetected}
    • Between the <ConversionIDTextField and <SpinnerButton> components, if isDuplicateAdsIdDetected is true, render a warning notice using the imported <WarningNotice> component:
      • Use the component at assets/js/components/notifications/AdBlockerWarningMessage.js to gauge implementation
      • Add the following wording for the notice:
        • "This Conversion ID is already in use via Google for WooCommerce plugin. We don't recommend adding it in Site Kit, as it may result in inaccurate measurement for your Ads campaign conversions."
        • This notice should not be dismissible in any form
        • This notice should disappear the moment the boolean value of isDuplicateAdsIdDetected is false

Test Coverage

  • Update VRT to contain a scenario with the warning message

QA Brief

  • Create a non-local site, i.e in InstaWP or TasteWP
  • Set up Site Kit with the adsPAX feature flag enabled
  • Install WooCommerce
  • Install Google for WooCommerce and set it up, linking to an existing Ads account, or creating a new account
  • Once set up, navigate to Site Kit > Settings > Connect More Services
  • Set up Ads
  • When presented with the new Ads setup layout (the split view, with account creation on left, manual input on right), open the web console
  • Retrieve the Google for WooCommerce stored AW-ID using the following console command: await googlesitekit.data.select('modules/ads').getGoogleForWooCommerceConversionID()
  • Paste that same AW ID into the manual input field
  • Validate that the warning notice shows as per the Figma, and that the CTA button is disabled
  • Change the value to something else, and validate that the warning message no longer appears, and the button is reenabled

Changelog entry

  • Show warning when Google for WooCommerce ads account is enabled.
@zutigrm zutigrm added P0 High priority Team S Issues for Squad 1 Type: Enhancement Improvement of an existing feature labels Feb 21, 2025
@zutigrm zutigrm assigned zutigrm and unassigned zutigrm Feb 21, 2025
@10upsimon 10upsimon self-assigned this Feb 25, 2025
@10upsimon
Copy link
Collaborator

@zutigrm this LGTM, I am going to pick this up and take on the IB.

@zutigrm
Copy link
Collaborator Author

zutigrm commented Feb 26, 2025

IB ✅

@zutigrm zutigrm removed their assignment Feb 26, 2025
@10upsimon 10upsimon self-assigned this Feb 26, 2025
@10upsimon 10upsimon assigned zutigrm and unassigned 10upsimon Feb 28, 2025
@zutigrm zutigrm removed their assignment Feb 28, 2025
@tofumatt tofumatt assigned tofumatt and 10upsimon and unassigned tofumatt and 10upsimon Feb 28, 2025
@mohitwp
Copy link
Collaborator

mohitwp commented Mar 3, 2025

QA Update ✅

  • Tested on dev environment.
  • Tested adsPAX feature flag enabled.
  • Tested when 'WooCommerce' and Google for WooCommerce is installed, activated and setup.
  • Verified that the warning notice shows as per the Figma, and that the CTA button is disabled.
  • Verified that on changing the value to something else, the warning message no longer appears, and the button is reenabled.

Image

Recording.1839.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority Team S Issues for Squad 1 Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants