Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/camel case track props to snake case #38717

Merged
merged 2 commits into from
Aug 5, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@ const ProductDetailCard = ( {
const ctaLabel = ctaButtonLabel || defaultCtaLabel;

const clickHandler = useCallback( () => {
trackButtonClick( { ctaText: ctaLabel } );
trackButtonClick( { cta_text: ctaLabel } );
onClick?.( mainCheckoutRedirect, detail );
}, [ onClick, trackButtonClick, mainCheckoutRedirect, detail, ctaLabel ] );

const trialClickHandler = useCallback( () => {
trackButtonClick( { customSlug: wpcomFreeProductSlug, ctaText: 'Start for free' } );
trackButtonClick( { custom_slug: wpcomFreeProductSlug, cta_text: 'Start for free' } );
onClick?.( trialCheckoutRedirect, detail );
}, [ onClick, trackButtonClick, trialCheckoutRedirect, wpcomFreeProductSlug, detail ] );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const ProductDetailTableColumn = ( {

// Register the click handler for the product button.
const onClick = useCallback( () => {
trackProductButtonClick( { isFreePlan: isFree, ctaText: callToAction } );
trackProductButtonClick( { is_free_plan: isFree, cta_text: callToAction } );
onProductButtonClick?.( runCheckout, detail, tier );
}, [
trackProductButtonClick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default function ProductInterstitial( {
recordEvent( 'jetpack_myjetpack_product_interstitial_add_link_click', {
product: productSlug,
product_slug: getProductSlugForTrackEvent( isFreePlan ),
ctaText,
cta_text: ctaText,
} );
},
[ recordEvent, slug, getProductSlugForTrackEvent, bundle ]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed


Loading