Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions js/src/meta-boxes/order-attribution/google-ads-promo.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const hasRecentPaidCampaigns = ( campaigns ) => {
/**
* Google Ads Promo "Get started" button is clicked.
*
* @event gla_google_ads_promo_get_started_click
* @event wcadmin_gla_google_ads_promo_create_campaign_click
* @property {string} context Context of the Google Ads Promo.
* @property {string} href URL of the "Get started" button.
*/
Expand All @@ -65,7 +65,7 @@ const hasRecentPaidCampaigns = ( campaigns ) => {
* Google Ads Promo component.
*
* @fires gla_google_ads_promo_shown with `{ context: 'order-attribution-meta-box' }`.
* @fires gla_google_ads_promo_get_started_click with `{ context: 'order-attribution-meta-box', href: 'admin.php?page=wc-admin&path=%2Fgoogle%2Fstart' }`.
* @fires wcadmin_gla_google_ads_promo_create_campaign_click with `{ context: 'order-attribution-meta-box', href: 'admin.php?page=wc-admin&path=%2Fgoogle%2Fstart' }`.
* @fires gla_google_ads_promo_create_campaign_click with `{ context: 'order-attribution-meta-box', href: 'admin.php?page=wc-admin&subpath=%2Fcampaigns%2Fcreate&path=%2Fgoogle%2Fdashboard' }`.
*
* @return {JSX.Element|null} The Google Ads Promo component or null.
Expand Down Expand Up @@ -135,7 +135,7 @@ const GoogleAdsPromo = () => {
cta: (
<AppButton
href={ getStartedUrl }
eventName="gla_google_ads_promo_get_started_click"
eventName="wcadmin_gla_google_ads_promo_create_campaign_click"
eventProps={ {
href: getStartedUrl,
context,
Expand Down
4 changes: 2 additions & 2 deletions js/src/meta-boxes/order-attribution/google-ads-promo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ describe( 'GoogleAdsPromo Component', () => {
);
} );

test( 'Fires gla_google_ads_promo_get_started_click event when Get started button is clicked', () => {
test( 'Fires wcadmin_gla_google_ads_promo_create_campaign_click event when Get started button is clicked', () => {
useAdsCampaigns.mockReturnValue( {
data: [],
loading: false,
Expand All @@ -260,7 +260,7 @@ describe( 'GoogleAdsPromo Component', () => {
);

expect( recordGlaEvent ).toHaveBeenCalledWith(
'gla_google_ads_promo_get_started_click',
'wcadmin_gla_google_ads_promo_create_campaign_click',
{ context: 'order-attribution-meta-box', href: '/get-started' }
);
} );
Expand Down
20 changes: 10 additions & 10 deletions src/Tracking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,16 +649,6 @@ Google Ads Promo "Dismiss" button is clicked.
#### Emitters
- [`PromoCTA`](../../js/src/meta-boxes/channel-visibility/promo-cta.js#L29) with `{ context: channel-visibility-meta-box }`.

### [`gla_google_ads_promo_get_started_click`](../../js/src/meta-boxes/order-attribution/google-ads-promo.js#L48)
Google Ads Promo "Get started" button is clicked.
#### Properties
| name | type | description |
| ---- | ---- | ----------- |
`context` | `string` | Context of the Google Ads Promo.
`href` | `string` | URL of the "Get started" button.
#### Emitters
- [`GoogleAdsPromo`](../../js/src/meta-boxes/order-attribution/google-ads-promo.js#L73) with `{ context: 'order-attribution-meta-box', href: 'admin.php?page=wc-admin&path=%2Fgoogle%2Fstart' }`.

### [`gla_google_ads_promo_shown`](../../js/src/meta-boxes/channel-visibility/google-ads-promo.js#L28)
Google Ads Promo banner is shown.
#### Properties
Expand Down Expand Up @@ -1245,6 +1235,16 @@ When the tour is shown.
#### Emitters
- [`exports`](../../js/src/components/tours/youtube-shopping-tour.js#L39) with `{ context: "youtube_shopping_tour" }`

### [`wcadmin_gla_google_ads_promo_create_campaign_click`](../../js/src/meta-boxes/order-attribution/google-ads-promo.js#L48)
Google Ads Promo "Get started" button is clicked.
#### Properties
| name | type | description |
| ---- | ---- | ----------- |
`context` | `string` | Context of the Google Ads Promo.
`href` | `string` | URL of the "Get started" button.
#### Emitters
- [`GoogleAdsPromo`](../../js/src/meta-boxes/order-attribution/google-ads-promo.js#L73) with `{ context: 'order-attribution-meta-box', href: 'admin.php?page=wc-admin&path=%2Fgoogle%2Fstart' }`.

<!---
End of `woocommerce-grow-tracking-jsdoc`-generated content.
-->
Expand Down
Loading