EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

Firebase Analytics - BigQuery, access complex event data logged from plugin #1652

Open Tyler-V opened 4 years ago

Tyler-V commented 4 years ago

Hi, having issues accessing the data logged by the plugin using a complex event.

      firebase.analytics
        .logComplexEvent({
          key: 'select_item',
          parameters: [
            {
              key: 'well_filters',
              type: 'array',
              value: [
                {
                  parameters: [
                    { key: 'show_all_wells', value: !this.showVisibleWellsOnly$.value, type: firebase.LogComplexEventTypeParameter.BOOLEAN },
                    { key: 'show_visible_wells_only', value: this.showVisibleWellsOnly$.value, type: firebase.LogComplexEventTypeParameter.BOOLEAN },
                    { key: 'oil', value: this.oil$.value, type: firebase.LogComplexEventTypeParameter.BOOLEAN },
                    { key: 'gas', value: this.gas$.value, type: firebase.LogComplexEventTypeParameter.BOOLEAN },
                    { key: 'oil_and_gas', value: this.og$.value, type: firebase.LogComplexEventTypeParameter.BOOLEAN },
                    { key: 'salt_water_disposal', value: this.swd$.value, type: firebase.LogComplexEventTypeParameter.BOOLEAN },
                    { key: 'enhanced_oil_recovery', value: this.eor$.value, type: firebase.LogComplexEventTypeParameter.BOOLEAN },
                    { key: 'other', value: this.other$.value, type: firebase.LogComplexEventTypeParameter.BOOLEAN },
                  ],
                },
              ],
            },
          ],
        })
        .then(() => {
          console.log('[FIREBASE] Logged event: select_item (Filter Change)');
        });

My event is being logged under 'select_item', I can see it after enabling parameter reporting:

image

When I enable BigQuery and try to access the raw data value of these complex events however im unable to retrieve any of the values.

image

image

Any tips or suggestions (assuming its a BigQuery issue) would be helpful however all of my queries and attempts have shown that the value written to the complex event is not in fact an array but a struct... which is why I am opening this issue

Thanks

Tyler-V commented 4 years ago

If I try to unnest the param values (array) it should display the raw values submitted however this is what I see,

image