如何在React Native Firebase中发送ecommerceBundle?

时间:2019-02-25 13:16:41

标签: firebase react-native firebase-analytics react-native-firebase

this doc

// Define product with relevant parameters

Bundle product1 = new Bundle();
product1.putString( Param.ITEM_ID, "sku1234"); // ITEM_ID or ITEM_NAME is required
product1.putString( Param.ITEM_NAME, "Donut Friday Scented T-Shirt");
product1.putString( Param.ITEM_CATEGORY, "Apparel/Men/Shirts");
product1.putString( Param.ITEM_VARIANT, "Blue");
product1.putString( Param.ITEM_BRAND, "Google");
product1.putDouble( Param.PRICE, 29.99 );
product1.putString( Param.CURRENCY, "USD" ); // Item-level currency unused today
product1.putLong( Param.INDEX, 1 ); // Position of the item in the list

// Prepare ecommerce bundle

Bundle ecommerceBundle = new Bundle();
ecommerceBundle.putBundle( "items", product1 );

// Set relevant action-level parameters

ecommerceBundle.putString( Param.ITEM_LIST, "Search Results" ); // Optional list name

// Log select_content event with ecommerce bundle

mFirebaseAnalytics.logEvent( Event.SELECT_CONTENT, ecommerceBundle );

如何在React Native中发送这样的数据?

0 个答案:

没有答案