woocommerce / google-listings-and-ads

Sync your store with Google to list products for free, run paid ads, and track performance straight from your store dashboard.
https://woo.com/products/google-listings-and-ads/
GNU General Public License v3.0
45 stars 21 forks source link

Remove the accounts connection page from the Ads Setup flow #2534

Open joemcgill opened 3 weeks ago

joemcgill commented 3 weeks ago

Part of https://github.com/woocommerce/google-listings-and-ads/issues/2460

When a merchant is setting up a new ads campaign from the plugin dashboard, they enter the "Set up paid campaign" flow, which includes individual steps for connecting a Google Ads account, configuring a campaign, and completing their billing setup.

image

Now that connecting an Ads account is a requirement of the initial onboarding process, we will remove the first step of this flow entirely, as it's no longer necessary. We'll still need to allow for an Ads account to be connected in this flow if one was disconnected from the settings screen (see this comment), but that flow will be consolidated into step 2 as a follow up to #2535.

Acceptance Criteria

Out of scope: addressing the use case where an Ads account was disconnected after onboarding.

Implementation Brief

The PR should get merged into the feature/2460-simplify-paid-ads-setup branch.

The component that defines the Set up paid campaign flow is the AdsStepper located at /js/src/setup-ads/ads-stepper/index.js. The first object in the array passed to the steps prop can be removed and any unused code cleaned up. The keys associated with each remaining step objects and the handleCreateCampaignContinue() function will need to be updated.

The SetupAccounts component defined in js/src/setup-ads/ads-stepper/setup-accounts/index.js can be deleted, along with any dependencies that are no longer in use after it has been removed.

Test Coverage

Definition Questions

Is there a way to confirm that the Ad setup was successful without actually creating a paid ad, since most billing is being spoofed during development?

As long as the Ads account is not suspended, the campaign should be created if billing is approved (see these instructions for working locally without billing).

joemcgill commented 3 weeks ago

@eason9487 could you give this a review and also provide any guidance you have about how to test this without setting up billing? Also, I'm curious what the best set of updates are for the Jest tests in js/src/setup-ads/ads-stepper/index.test.js. It seems these are mostly to test the behavior of the stepper and not the specific steps. Given the simplification described in #2460, is this test still necessary? If so, what assertions would be helpful?

eason9487 commented 2 weeks ago

Is there a way to confirm that the Ad setup was successful without actually creating a paid ad, since most billing is being spoofed during development?

Usually it doesn't need to bypass the creation of paid ads in development, but instead bypasses the billing settings. Because the paid ads will never go live or be charged since the billing isn't fully complete.

[...] how to test this without setting up billing?

This hack should be able to skip the billing setup.

Also, I'm curious what the best set of updates are for the Jest tests in js/src/setup-ads/ads-stepper/index.test.js. It seems these are mostly to test the behavior of the stepper and not the specific steps.

In the relatively early days of development, we wrote almost no jest tests. It's only in the last year or two that we've had more time, but still haven't had the resources to make up for better coverage.

Given the simplification described in #2460, is this test still necessary? If so, what assertions would be helpful?

Writing tests is not yet mandatory, but it would be great to at least write tests for the modified scope when possible.

eason9487 commented 2 weeks ago

I'm a little suspicious that the accounts connection step can be removed since the Google Ads account can be disconnected individually on the Settings page. I couldn't figure out how users can reconnect once the step is removed.

image

joemcgill commented 2 weeks ago

I'm a little suspicious that the accounts connection step can be removed since the Google Ads account can be disconnected individually on the Settings page. I couldn't figure out how users can reconnect once the step is removed.

That's a good point, @eason9487. I'm not sure that someone disconnecting from the settings page had been considered. I think we have a few options. We could optionally show the account connection page only when an ads account isn't connected. We could also update the Google Ads card on the settings screen so that a merchant would be able to reconnect their account from there. @fblascogarma what do you think would be best?

fblascogarma commented 2 weeks ago

Hi @joemcgill and @eason9487 , we're talking about the use case: merchant disconnects Google Ads accounts in Settings page (post onboarding), right?

In that case, onboarding has finished, so it doesn't impact the onboarding flow UX. However, merchants should be able to connect/create a Google Ads account in the Setting page if for some reason they disconnected it before.

Let me know if you have follow up questions.

fblascogarma commented 2 weeks ago

If you're talking about the case: merchants want to create ads in post onboarding, they should've already done Ads Account connection. If for some reason they disconnected it, once they start the ads creation they should be prompted to create/link Ads account in order to create ads.

joemcgill commented 2 weeks ago

If you're talking about the case: merchants want to create ads in post onboarding, they should've already done Ads Account connection. If for some reason they disconnected it, once they start the ads creation they should be prompted to create/link Ads account in order to create ads.

Allowing an Ads account to be connected if it was disconnected from the setting screen is exactly the scenario we were talking about. After additional discussion with @fblascogarma earlier today, we will remove this first step and add the option to connect an Ads account when disconnected in a follow-up issue. Currently, the idea is that we will add an Ads connection card to the new consolidated campaign creation page (#2535) when necessary. The campaign creation step of the onboarding previously included this UI, but it was removed for #2215.

joemcgill commented 2 days ago

Per this comment, we will optionally show this first accounts connection step if for some reason the Ads account has been disconnected prior to creating a new campaign. We're determining whether this will be handled in the current PR, or if we'll do so as a follow-up task.