invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.69k stars 2.21k forks source link

Can't send Item price to analytics #5227

Closed artemkhalygov closed 3 years ago

artemkhalygov commented 3 years ago

Issue

Why it's impossible to add price to the Item inside viewItemList? As I can see in documentation https://firebase.google.com/docs/analytics/measure-ecommerce#javascript - it should be possible.

image

But the current Item structure doesn't have a price. Maybe I'm wrong but it should be here, isn't it?

export interface Item {
    item_brand?: string;
    item_id?: string;
    item_name?: string;
    item_category?: string;
    item_category2?: string;
    item_category3?: string;
    item_category4?: string;
    item_category5?: string;
    item_list_id?: string;
    item_list_name?: string;
    item_location_id?: string;
    item_variant?: string;
    quantity?: number;
 }

Thanks.

Project Files

Javascript

Click To Expand

#### `package.json`: ```json "@react-native-firebase/analytics": "^11.2.0", "@react-native-firebase/app": "^11.2.0", "@react-native-firebase/dynamic-links": "^11.2.0", "@react-native-firebase/messaging": "^11.2.0", ```

mikehardy commented 3 years ago

Have you checked the issues list? There is some good discussion on this one if I recall correctly

artemkhalygov commented 3 years ago

@mikehardy Yes, I am. But I found only this PR that related to my issue https://github.com/invertase/react-native-firebase/pull/4536

I'm almost sure that price also should be added.

mikehardy commented 3 years ago

I will happily work with you to merge a PR implementing the things you need, the PR you linked could be a good template to do so

You may be interested in the comments on a related issue, starting here: https://github.com/invertase/react-native-firebase/issues/4578#issuecomment-738299069

artemkhalygov commented 3 years ago

@mikehardy Agree with you, that I can fix it myself

So I created a PR https://github.com/invertase/react-native-firebase/pull/5232

mikehardy commented 3 years ago

Fixed by #5232