Skip to content

fix: update product_id to match e commerce spec #803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,12 @@ PODS:
- React
- RNGestureHandler (2.6.0):
- React-Core
- segment-analytics-react-native (2.13.1):
- segment-analytics-react-native (2.13.4):
- React-Core
- sovran-react-native
- segment-analytics-react-native-plugin-idfa (0.6.0):
- segment-analytics-react-native-plugin-idfa (0.6.1):
- React-Core
- sovran-react-native (1.0.0):
- sovran-react-native (1.0.1):
- React-Core
- Yoga (1.14.0)

Expand Down Expand Up @@ -484,9 +484,9 @@ SPEC CHECKSUMS:
RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNGestureHandler: 920eb17f5b1e15dae6e5ed1904045f8f90e0b11e
segment-analytics-react-native: f962dff3a084655a29f9403b8c139c75a3362524
segment-analytics-react-native-plugin-idfa: 6b0231a40b5aebc869eba83d51ea509023345ef7
sovran-react-native: 1ac9ae5d8c95f945e0c7aa0a2f443133ede68f02
segment-analytics-react-native: cc12d9422f7ce863ee57c1b650ab48eec4b6d5bd
segment-analytics-react-native-plugin-idfa: 7fec83a58a2b8ad21bb4774d8b6ef4421fa1a62d
sovran-react-native: 2964014cf2b12b6f0939a38199fe70477adc92b5
Yoga: 0b84a956f7393ef1f37f3bb213c516184e4a689d

PODFILE CHECKSUM: 148f23dc44ebce74497f5fef0651f1fea1f8a361
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/info.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const libraryInfo = {
name: '@segment/analytics-react-native',
version: '2.13.3',
version: '2.13.4',
};
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ describe('#track', () => {
revenue: '399.99',
products: [
{
productId: '123',
product_id: '123',
price: '399.99',
quantity: 4,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/plugin-braze/src/methods/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ export default (payload: TrackEventType) => {

products.forEach((product) => {
const productDict = Object.assign({}, product);
const productId = productDict.productId;
const productId = productDict.product_id;
const productRevenue = extractRevenue(productDict, 'price');
const productQuantity = productDict.quantity;
delete productDict.productId;
delete productDict.product_id;
delete productDict.price;
delete productDict.quantity;
let productProperties = Object.assign(
Expand Down