Skip to content

Commit

Permalink
🔀 Merge master to deploy/rinkeby
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Sep 24, 2024
2 parents d711cbe + 26bfe11 commit 08b8d04
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/static/vendor/fbq.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1013529535523534');
fbq('init', '4022559437964917');
fbq('track', 'PageView');
13 changes: 12 additions & 1 deletion src/util/EventLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ export function logPurchaseFlowEvent(
window.fbq('track', eventNameMapping[event], {
currency,
value: price,
content_type: 'product',
contents: items.map(i => ({
id: i.productId || i.collectionId || i.classId,
quantity: i.quantity || 1,
})),
content_ids: items.map(
i => i.productId || i.collectionId || i.classId
),
Expand Down Expand Up @@ -242,7 +247,13 @@ export function logPurchaseNFTBookEvent(
window.fbq('trackCustom', 'PurchaseBook', {
currency,
value: price,
quantity,
content_type: 'product',
contents: [
{
id: collectionId || classId,
quantity: quantity || 1,
},
],
content_ids: [collectionId || classId],
});
}
Expand Down

0 comments on commit 08b8d04

Please sign in to comment.