-
Notifications
You must be signed in to change notification settings - Fork 293
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
Implement UI for new AdSense setup site components #4764
Comments
IB ✅ |
@jimmymadon Replied to the question on the PR. Regarding the QA Brief, that's a bit vague, it's not very helpful to say to verify the ACs. We also have the tester plugin version 1.8.0 released now which allows mocking all these states, so I think the QA here could already be in-product. I'd advise iterating on the QA Brief with a more clear outline on how to set account status (can probably be set to |
@felixarntz Ah thanks for pointing this out! Since the AC and IB both hinted at testing this solely in Storybook, I had a feeling that there might be other related issues that need to be completed for it all to be tested in-product. And the new stories in storybook which I linked to are almost a 1:1 mapping of the ACs - hence my rather brief comment for the QAB! Will update this as suggested. |
QA Update: ❌@jimmymadon I have three observations:
|
@wpdarren Thanks for the thorough QA as always!
|
QA Update:
|
I've sent this back to execution because feel that this is where it belongs right now due to the issues reported above. |
The buttons in the setup flows to complete the setup always say "Configure ", that's why it is like that. I agree though that can be misleading, but I would advise to rethink the wording of these buttons across all module setups then, not just this one. Definitely supportive of opening an issue, but it shouldn't be in this epic and apply to all modules rather than just AdSense.
Can you clarify this particular observation? Only sites without existing tags should be forced to enable auto ads - sites with an existing tag should be able to click the secondary link to bypass this, regardless of what their setting on the AdSense side is. If that is not the case right now, this is incorrect and needs to be fixed.
This probably happened because you took "too little" time to enable auto ads in the AdSense frontend. We have that functionality that refreshes the AdSense setup flow once you've come back from another tab, and there is a minimum timeout. It looks like that may be set a bit too high. Can you test this again while waiting a bit longer, just to know whether it's in fact that? In any case, this is a problem we need to address, but let's do it in a separate issue. Can you please open one? We can treat that as a known issue for the bug bash, if we don't have it fixed by then. Some background on enforcing auto ads for "new" users ("new" meaning "without an existing tag"): Site Kit does not support out of the box in any way to place ads yourself, so that requires users that really know what they're doing, placing JS snippets and such. So if you don't use auto ads, basically Site Kit can't help you much in its current state, and it's always been that way, that Site Kit only really works out of the box when using auto ads. The thing is that before, in the V1 flow, there was no way to verify that through the API, so we only had this message that said "Make sure you've enabled auto ads". We don't want to give a button to bypass enabling auto ads as it would make many people think they can actually just bypass that and it will still work, which is not the case. For users that are savvy enough to place their own ad units, they can also paste the entire snippet themselves, in which case it will be treated as an existing tag. At this point, they are only using the AdSense module in Site Kit for its reporting capabilities, not to deploy any tags. |
Thanks @felixarntz for the updates, appreciated.
I will create an Asana ticket to remind me to create a more thorough Github ticket for this once we have the release out of the way. I'd not realised it said configure on other modules.
Yes, this is the correct behaviour. If I do not have an existing tag then I am forced to auto ads. If there is an existing tag then there is a link to bypass the auto ads. I now understand more about why we are forcing auto ads within the plugin. This is not an issue, so can move on. Thanks for the explanation.
Yes, this is an issue. I am taking my time in all the steps and when I go back to the tab with Site Kit after enabling auto ads, nothing happens and unable to complete the set up of AdSense. I will create an Asana ticket to create a Github ticket with more details once release is out of the way. ASI bug bash isn't for a little while yet, so in the meantime, will move this to approved. |
QA Update: ✅Verified:
Needs attention: Needs review: Getting ready: Ready: no auto ads, no existing tag: Ready: no auto ads, existing tag: |
Approval
|
@felixarntz So in the absence of Figma mocks, I referenced other similar Module Setup screens which have a secondary CTA button, e.g. Analytics Create Account and Tag Manager Create Account. Happy to make a follow up PR - but should I do that for just this secondary button or should we fix the others too (perhaps fix all together in a separate issue)? |
+1 for addressing this holistically in a follow-up issue since there is already an inconsistency in production 👍 |
@jimmymadon @aaemnnosttv Makes sense, thanks. I'll add ACs to #5184. |
This issue is for actually implementing the UI (and a bit off extra logic) for the enhanced AdSense setup flow main components that were introduced in #4760.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
SetupAccountSite
component from Scaffold (logic for) new AdSense setup site components #4760 should have its UI implemented. The existing conditions in that component (that currently just return dummy content) should be kept, but now return the actual UI needed, as follows:SetupSiteAdd
orSetupAccountNoClient
), each one withErrorNotices
component (which shows errors just if there are some)p
SetupUseSnippetSwitch
from Implement modified snippet toggle component for enhanced AdSense setup flow #4761 (which is displayed conditionally by itself)<Button>
or<Link>
(with technically both being links, but the appearance would differ)NEEDS_ATTENTION
case, introduce a new componentSetupAccountSiteNeedsAttention
with the following content:<Button>
:getServiceAccountManageSitesURL
selector${ viewContext }_adsense
, name:review_site_state
, label:needs_attention
), and the link URL should open in a new window.REQUIRES_REVIEW
case, introduce a new componentSetupAccountSiteRequiresReview
with the following content:<Button>
:getServiceAccountManageSitesURL
selector${ viewContext }_adsense
, name:review_site_state
, label:requires_review
), and the link URL should open in a new window.GETTING_READY
case, introduce a new componentSetupAccountSiteGettingReady
with the following content:<Link>
:getServiceAccountManageSitesURL
selector${ viewContext }_adsense
, name:review_site_state
, label:getting_ready
), and the link URL should open in a new window.READY
case (regardless of whether auto ads are enabled or not), introduce a new componentSetupAccountSiteReady
. That component should now include the check forsite.auto_ads_enabled
and whether it istrue
orfalse
. It should also include a local state variable that allows storing whether the user has acknowledged that auto ads are disabled (since we want to encourage users to enable it, but not force them to).<Button>
:getServiceAccountSiteAdsPreviewURL
selector${ viewContext }_adsense
, name:enable_auto_ads
), and the link URL should open in a new window.<Link>
(this should be a secondary action appearing on the right of the above<Button>
):${ viewContext }_adsense
, name:disable_auto_ads
), and it should set the above state variable to acknowledge that auto ads are disabled (i.e. after clicking this the user should land in the other alternative UI of this component).<Button>
:completeAccountSetup
,completeSiteSetup
, andfinishSetup
. It should not fire any GA event since thefinishSetup
callback already has one.Implementation Brief
assets/js/modules/adsense/components/setup/v2/common/SetupAccountSiteUI.js
which exports theSetupAccountSiteUI
functional component with the following details:assets/js/modules/adsense/components/setup/SetupSiteAdd.js
with the following changes:assets/js/modules/adsense/components/setup/v2/SetupUseSnippetSwitch.js
which will be rendered after thep
tag.Button
component which will be rendered after the existingButton
one.googlesitekit-setup-module__*
class names should be updated togooglesitekit-adsense-setup__
and styles copied over accordingly if any.heading
: String to be rendered within theh3
tag.description
: String to be rendered within thep
tag.primaryButton
: Object with the following properties:href
: String to be used as thehref
attribute of theButton
component.label
: String to be used as thechildren
property of theButton
component.onClick
: Callback function if defined when theButton
is clicked, to be assigned to theonClick
property of theButton
component.secondaryButton
: Object having the same properties asprimaryButton
.SetupAccountSiteNeedsAttention
,SetupAccountSiteRequiresReview
andSetupAccountSiteGettingReady
, create their corresponding files inassets/js/modules/adsense/components/setup/v2/
which export the same functional component as their file name and with the details below:SetupAccountSiteUI
component using the above props and strings (translated) from the AC for each component.onButtonClick
function which will calltrackEvent
with the parameters defined in the AC and this function should be passed as theonClick
property of theprimaryButton
prop.assets/js/modules/adsense/components/setup/v2/SetupAccountSiteReady.js
which exports theSetupAccountSiteReady
functional component with the following details:site
object prop.acknowledgedDisabledAutoAds
with default valuefalse
modules/adsense
data store via thegetExistingTag
selector to check if there's an existing tag.SetupAccountSiteUI
component to render the strings as per the AC when :site.auto_ads
isfalse
andacknowledgedDisabledAutoAds
isfalse
along whether there is an existing tag or not.site.auto_ads
istrue
oracknowledgedDisabledAutoAds
istrue
along whether there is an existing tag or not.assets/js/modules/adsense/components/setup/v2/SetupAccountSite.js
, render the following components with the appropriate condition:NEEDS_ATTENTION
:SetupAccountSiteNeedsAttention
REQUIRES_REVIEW
:SetupAccountSiteRequiresReview
GETTING_READY
:SetupAccountSiteGettingReady
READY
:SetupAccountSiteReady
assets/js/modules/adsense/components/setup/v2/SetupMain.stories.js
are rendered properly.Test Coverage
QA Brief
Within the plugin:
adsenseSetupV2
flag).adsenseSetupV2
flag. Set theForce AdSense account status
toready
and keep it so throughout the following steps. Now cycle through the different options ofForce AdSense site status
fromneeds attention
toready
and attempt to activate/setup AdSense within the plugin for each site status option. Verify the UI is as per the AC for each site status. Theready
andready-no-auto-ads
statuses need to be tested with and without a value set forPlace AdSense existing tag
.ca-pub-123456789
could be used as a valid existing tag value. So effectively, theREADY
status in the AC has four variations that need to be tested: With and withoutAuto Ads Enabled
+ with and without an existing tag being present.Within Storybook:
Account: Site - Needs Attention
toAccount: Site - Invalid Site State
. The last story is not in the AC but stems from this comment.Changelog entry
The text was updated successfully, but these errors were encountered: