diff --git a/plugins/woocommerce-admin/client/marketplace/components/discover/discover.tsx b/plugins/woocommerce-admin/client/marketplace/components/discover/discover.tsx
index 52f3843f08d..06862502169 100644
--- a/plugins/woocommerce-admin/client/marketplace/components/discover/discover.tsx
+++ b/plugins/woocommerce-admin/client/marketplace/components/discover/discover.tsx
@@ -73,6 +73,7 @@ export default function Discover(): JSX.Element | null {
{ groupsList.map( ( groups ) => (
diff --git a/plugins/woocommerce-admin/client/marketplace/components/product-list-content/product-list-content.tsx b/plugins/woocommerce-admin/client/marketplace/components/product-list-content/product-list-content.tsx
index 411e8b587e3..aa8218e0d8c 100644
--- a/plugins/woocommerce-admin/client/marketplace/components/product-list-content/product-list-content.tsx
+++ b/plugins/woocommerce-admin/client/marketplace/components/product-list-content/product-list-content.tsx
@@ -15,6 +15,7 @@ import { getAdminSetting } from '../../../utils/admin-settings';
export default function ProductListContent( props: {
products: Product[];
group?: string;
+ productGroup?: string;
type: ProductType;
className?: string;
searchTerm?: string;
@@ -50,9 +51,12 @@ export default function ProductListContent( props: {
price: product.price,
url: appendURLParams(
product.url,
- Object.entries(
- wccomHelperSettings.inAppPurchaseURLParams
- )
+ Object.entries( {
+ ...wccomHelperSettings.inAppPurchaseURLParams,
+ ...( props.productGroup !== undefined
+ ? { utm_group: props.productGroup }
+ : {} ),
+ } )
),
description: product.description,
} }
diff --git a/plugins/woocommerce-admin/client/marketplace/components/product-list/product-list.tsx b/plugins/woocommerce-admin/client/marketplace/components/product-list/product-list.tsx
index c054f0b8473..f3bb2d51d68 100644
--- a/plugins/woocommerce-admin/client/marketplace/components/product-list/product-list.tsx
+++ b/plugins/woocommerce-admin/client/marketplace/components/product-list/product-list.tsx
@@ -7,13 +7,14 @@ import { Product, ProductType } from './types';
interface ProductListProps {
title: string;
+ productGroup?: string;
products: Product[];
groupURL: string;
type: ProductType;
}
export default function ProductList( props: ProductListProps ): JSX.Element {
- const { title, products, groupURL, type } = props;
+ const { title, products, groupURL, type, productGroup } = props;
return (
@@ -22,6 +23,7 @@ export default function ProductList( props: ProductListProps ): JSX.Element {
group={ title }
products={ products }
type={ type }
+ productGroup={ productGroup }
/>
);
diff --git a/plugins/woocommerce/changelog/41967-add-18914-utm-category-to-product-url b/plugins/woocommerce/changelog/41967-add-18914-utm-category-to-product-url
new file mode 100644
index 00000000000..558724bab9a
--- /dev/null
+++ b/plugins/woocommerce/changelog/41967-add-18914-utm-category-to-product-url
@@ -0,0 +1,4 @@
+Significance: minor
+Type: dev
+
+Add UTM group to product URL on the Discover page
\ No newline at end of file