Skip to content

Commit

Permalink
Update marketplace items to use new HTML attributes click tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
bradp committed Sep 13, 2024
1 parent 7c4cf4b commit e5becae
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/marketplaceItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ const MarketplaceItem = ( { item, methods, constants } ) => {
target="_blank"
data-action="load-nfd-ctb"
data-ctb-id={ item.clickToBuyId }
data-nfd-click="newfold-marketplaceitem-click"
data-nfd-event-key={ item.primaryCallToAction }
data-nfd-product-id={ item.clickToBuyId }
>
{ item.primaryCallToAction }
</Button>
Expand Down Expand Up @@ -187,7 +190,12 @@ const MarketplaceItem = ( { item, methods, constants } ) => {

if ( item.secondaryCallToAction && item.secondaryUrl ) {
secondaryCTA = (
<Link { ...getLinkAttributes() }>
<Link
{ ...getLinkAttributes() }
data-nfd-click="newfold-marketplaceitem-click"
data-nfd-event-key={ item.secondaryCallToAction }
data-nfd-product-id={ item.id }
>
<span className="nfd-text-primary">
{ item.secondaryCallToAction }
</span>
Expand Down

0 comments on commit e5becae

Please sign in to comment.