Agung
Agung

Reputation: 13853

how to get Firebase Analytics App Instance Id for Web App?

I am trying to log purchase event via Google Analytics 4 Measurement Protocol. if I read this documentation, it is said that I must have app_instance_id so I can send the data from our backend to GA4 server.

we are using Vue and Firebase Nuxt for our web app, but unfortunately, as you can see from the image below, I can't find a method to get app_instance_id

enter image description here

so how to get app_instance_id for web app in Firebase for web app? is it not available yet? please help

Upvotes: 1

Views: 1955

Answers (1)

Agung
Agung

Reputation: 13853

unfortunately, for now the app_instance_id is not available for web. please read the full explanation in Github from Firebase Analytics repo maintainer in here

and for now, from the event builder measurement procotol web, it seems that we can't use Firebase for web client, we have to use gtag instead. Firebase is only for mobile. the JSON body and query parameters will be different if you send event via gtag or via Firebase

https://ga-dev-tools.google/ga4/event-builder/

enter image description here

this is the documentation to send event via gtag

Upvotes: 1

Related Questions