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

Campaign Creation: Add minimum budget limit #2503

Open joemcgill opened 1 month ago

joemcgill commented 1 month ago

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

As a follow-up to #2502, even when we initialize the BudgetSection component with the recommended daily budget amount, merchants can edit the value to a lower value. For example, a merchant could set a campaign for 1 cent per day.

We already have budget recommendations for each country, so we could take a % of that recommendation and set it up as a minimum. For example, if the budget recommendation for US is $15/day, the minimum possible budget should be $5/day (~30% of recommended budget).

If a user tries to input a number lower than the minimum, we should display a validation error with an explanation of what needs to change.

Example mockup

image

Acceptance Criteria

Implementation Brief

The component where this is displayed is the BudgetSection component, but the validation logic will need to be applied in the CampaignAssetsForm component by updating the validation logic of the validateCampaign function (ref).

Test Coverage

E2E tests for step 4 of the setup process is updated to cover examples where the minimum value is set and when a value less than the minimum is set.

joemcgill commented 1 month ago

Consolidating into #2502.

joemcgill commented 1 month ago

Actually, no, setting a minimum budget limit will be a separate task from setting the initial value, which is what will be handled in #2502. Reopening this to define requirements for setting the minimum limit.

eclarke1 commented 1 month ago

Adding back the custom labels as this was not appearing in our 'Detailed Epic View'

eclarke1 commented 1 month ago

@joemcgill please could you re-add the size and Eng Focus labels (once the AC/IB has been added of course)

joemcgill commented 1 month ago

@fblascogarma and @MatthiasReinholz, we'll need to confirm how we want to calculate the minimum value and better define the UX for when a merchant enters a value lower than the minimum.

joemcgill commented 2 weeks ago

@fblascogarma confirmed in Slack that we should use 30% of the recommended budget as the minimum for now. I think we can try to show a similar validation logic when the field value changes to an empty or zero value...

Image

Instead of "Please make sure daily average cost is greater than 0." the text can be "Please make sure daily average cost is greater than %d." where %d is replaced with the minimum. When the value is less than the minimum the "Complete setup" button will remain disabled.

fblascogarma commented 2 weeks ago

Correct, let's use 30%, see how it goes with that, and adjust if needed.

The default value should be the recommended budget. If users set up a budget below the recommended, we show them the message we have today in production. If users set up budget below the %d (minimum budget allowed) we can use with red font saying that the minimum is %d to avoid poor performance for very low budgets.

What do you think?

fblascogarma commented 2 weeks ago

30% and rounding up for a nicer number. For example, $28,000 instead of $27,547

joemcgill commented 2 weeks ago

@eason9487 I'm going to go ahead and take a swing at implementing this, but would appreciate any feedback you have about the approach to applying the validation logic/styles when you have a chance.

eason9487 commented 1 week ago

Will this change be applied to campaign editing? If so, I would suggest adjusting the issue title and describing how it change campaign editing, e.g. whether to apply this limit to campaigns that already exist and are below the minimum budget.

dsawardekar commented 1 week ago

@asvinb Assigning this to you for the styling updates, please send back to me once complete, as I need to implement the e2e tests.

asvinb commented 1 week ago

@dsawardekar PR has been updated to add the style updates. Let me know if i've missed anything.

asvinb commented 1 day ago

@dsawardekar Can you kindly fix the merge conflicts please, then I'll review the PR. Just FYI, we removed the Audience section from the paid ads setup: https://github.com/woocommerce/google-listings-and-ads/pull/2551

dsawardekar commented 1 day ago

@asvinb Updated. And also remove the unused import.