File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
packages/plugins/plugin-facebook-app-events/src/methods Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export const mapEventNames = {
7
7
'Order Completed' : 'fb_mobile_purchase' ,
8
8
'Product Added' : 'fb_mobile_add_to_cart' ,
9
9
'Product Added to Wishlist' : 'fb_mobile_add_to_wishlist' ,
10
+ 'Checkout Started' : 'fb_mobile_initiated_checkout' ,
10
11
} as any ;
11
12
12
13
export const mapEventProps : { [ key : string ] : string } = {
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export default (event: TrackEventType) => {
46
46
let safeProps = sanitizeEvent ( safeEvent ) ;
47
47
const currency = ( safeProps . fb_currency as string | undefined ) ?? 'USD' ;
48
48
49
- if ( safeProps . _valueToSum !== undefined ) {
49
+ if ( safeProps . _valueToSum !== undefined && safeName === 'fb_mobile_purchase' ) {
50
50
let purchasePrice = safeProps . _valueToSum as number ;
51
51
52
52
AppEventsLogger . logPurchase ( purchasePrice , currency , safeProps ) ;
You can’t perform that action at this time.
0 commit comments