简体   繁体   中英

Trigger a Google Analytics for Firebase function doesn't work

I'm trying to trigger a cloud function when an specific event happens, but it does not work.

I have marked the event as conversion event in the Events tab of the Firebase console Analytics pane.

When the event is triggered, I can see it in the Debug View tab of the Firebase console Analytics pane, but nothing happens in Firebase console Function pane.

Here I leave you my index.js file: 在此处输入图片说明

I had the same problem. The problem in my case was in the data privacy settings for my firebase project. You must activate the "Sharing Analytics data with Firebase features" option, otherwise cloud function trigger from Google Analytics event will not work.

I had the same problem, and checked all the settings mentioned by @yasyd , but none of those helped. 2 hours after I got my event log trigger deployed and turned on the conversion event, my cloud function started to work and got fired when an event was logged, so it just need some time. I guess they should mention this delay in the Firebase Functions documentation.

Issue I faced was it was a web app I was trying to send the conversion analytics from, in order to trigger cloud function. But doc says it is not supported.

Only iOS and Android events marked as conversion events are currently supported by Cloud Functions; Web conversion events are not currently available. You can specify which events are conversion events in the Events tab of the Firebase console Analytics pane.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM