Skip to content

Commit

Permalink
Merge pull request #2167 from woocommerce/add/tracking-budget-onboard…
Browse files Browse the repository at this point in the history
…ing-setup-ads

Add (budget and audiences) tracking for Onboarding completed with Ads
  • Loading branch information
puntope authored Dec 13, 2023
2 parents abb5fcb + 7c7ee87 commit 185f3f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const ACTION_SKIP = 'skip-ads';
* Clicking on the "Complete setup" button to complete the onboarding flow with paid ads.
*
* @event gla_onboarding_complete_with_paid_ads_button_click
* @property {number} budget The budget for the campaign
* @property {string} audiences The targeted audiences for the campaign
*/

/**
Expand Down Expand Up @@ -207,6 +209,10 @@ export default function SetupPaidAds() {
disabled={ disabledComplete }
onClick={ handleCompleteClick }
eventName="gla_onboarding_complete_with_paid_ads_button_click"
eventProps={ {
budget: paidAds.amount,
audiences: paidAds.countryCodes?.join( ',' ),
} }
/>
</Flex>
</StepContentFooter>
Expand Down
13 changes: 9 additions & 4 deletions src/Tracking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ A modal is open
- [`ReviewRequest`](../../js/src/product-feed/review-request/index.js#L31) with `context: REQUEST_REVIEW`
- [`SubmissionSuccessGuide`](../../js/src/product-feed/submission-success-guide/index.js#L155) with `context: GUIDE_NAMES.SUBMISSION_SUCCESS`

### [`gla_onboarding_complete_button_click`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L45)
### [`gla_onboarding_complete_button_click`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L47)
Clicking on the skip paid ads button to complete the onboarding flow.
The 'unknown' value of properties may means:
- the paid ads setup is not opened
Expand All @@ -585,17 +585,22 @@ Clicking on the skip paid ads button to complete the onboarding flow.
`billing_method_status` | `string` | aaa, The status of billing method of merchant's Google Ads addcount e.g. 'unknown', 'pending', 'approved', 'cancelled'
`campaign_form_validation` | `string` | Whether the entered paid campaign form data are valid, e.g. 'unknown', 'valid', 'invalid'
#### Emitters
- [`exports`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L67)
- [`exports`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L69)

### [`gla_onboarding_complete_with_paid_ads_button_click`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L39)
Clicking on the "Complete setup" button to complete the onboarding flow with paid ads.
#### Properties
| name | type | description |
| ---- | ---- | ----------- |
`budget` | `number` | The budget for the campaign
`audiences` | `string` | The targeted audiences for the campaign
#### Emitters
- [`exports`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L67)
- [`exports`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L69)

### [`gla_onboarding_open_paid_ads_setup_button_click`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L33)
Clicking on the "Create a paid ad campaign" button to open the paid ads setup in the onboarding flow.
#### Emitters
- [`exports`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L67)
- [`exports`](../../js/src/setup-mc/setup-stepper/setup-paid-ads/setup-paid-ads.js#L69)

### [`gla_paid_campaign_step`](../../js/src/utils/recordEvent.js#L122)
Triggered when moving to another step during creating/editing a campaign.
Expand Down

0 comments on commit 185f3f8

Please sign in to comment.