google-listings-and-ads icon indicating copy to clipboard operation
google-listings-and-ads copied to clipboard

Campaign Creation: Add minimum budget limit

Open joemcgill opened this issue 1 year ago • 16 comments

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

  • [ ] A minimum possible value for the Daily Average Cost will be 30% of the recommended daily budget
  • [ ] If the Daily Average Cost input is set to a value lower than the minimum possible budget, a validation warning is shown reading "Please make sure daily average cost is greater than %d." where %d is replaced with the minimum.
  • [ ] If the Daily Average Cost input is set to a value lower than the minimum possible budget, the validation error is shown
  • [ ] If the Daily Average Cost input is set to a value lower than the minimum possible budget, the "Complete setup" button is disabled.

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 avatar Aug 06 '24 20:08 joemcgill

Consolidating into #2502.

joemcgill avatar Aug 08 '24 02:08 joemcgill

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.

joemcgill avatar Aug 08 '24 02:08 joemcgill

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

eclarke1 avatar Aug 08 '24 08:08 eclarke1

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

eclarke1 avatar Aug 08 '24 08:08 eclarke1

@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 avatar Aug 08 '24 20:08 joemcgill

@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.

joemcgill avatar Aug 27 '24 21:08 joemcgill

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 avatar Aug 28 '24 15:08 fblascogarma

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

fblascogarma avatar Aug 28 '24 15:08 fblascogarma

@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.

joemcgill avatar Aug 28 '24 19:08 joemcgill

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.

eason9487 avatar Sep 03 '24 01:09 eason9487

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

dsawardekar avatar Sep 05 '24 07:09 dsawardekar

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

asvinb avatar Sep 06 '24 13:09 asvinb

@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

asvinb avatar Sep 11 '24 15:09 asvinb

@asvinb Updated. And also remove the unused import.

dsawardekar avatar Sep 12 '24 04:09 dsawardekar

@joemcgill I made a few tweaks to @dsawardekar 's PR. Can you kindly review please? Thanks!

asvinb avatar Sep 16 '24 14:09 asvinb

Assigned to @dsawardekar and @asvinb because I'm not sure who is working on this ticket for now.

eason9487 avatar Sep 23 '24 12:09 eason9487

Closing this as completed since it was part of the 2.9 release.

mikkamp avatar Dec 02 '24 15:12 mikkamp