How to extract firebase user parameter and send to google analytics via google tag manager?

可紊 提交于 2019-12-11 15:35:11

问题


I'm trying to figure out how to extract the very common and auto generated user property, "first_open_time" from firebase and send to GA.

This is in the context of a mobile app (iOS/Android) - I have already implemented tag manager sdk, firebase sdk quite some time ago and can successfully send any events that we generate from the ios and android clients to firebase, and use the tagmanager to send them to ga. However, anytime I try to do the same with any of the free firebase events, such as user_engagement event or screen_view event - nothing ever shows up in GA the same as when its an event I created from the client. So instead of trying to pluck out the free event from firebase now i'm trying to pluck out just the first_open_time user property that is automatically set by firebase.

Screenshot of firebase debug view showing user property

I created a gtm variable: first_open_time that is a Firebase User Property, in a Firebase compatible container.

Screenshot of gtm variable definition

I created a gtm trigger that watches for an event named "customEvent" and this does get triggered properly.

I created a gtm tag that puts the Firebase User Property first_open_time into a customDimension already defined in GA.

Screenshot of Google Tag Manager - Tag definition

But this never sends this particular field. All the other properties that I've explicitly defined come through, but none of the free events or free parameters from firebase DO NOT come through.

Screenshot of GA with NO Results for that new Custom Dimension


回答1:


I don't think this is actually possible. Regarding the first_open_time for example, a work-around is to store the epoch time when the app is opened at the first time. Then, to retrieve it using a CustomVariableProvider. It would become available anytime in GTM.

  • https://developers.google.com/tag-manager/ios/v5/advanced-config
  • https://developers.google.com/tag-manager/android/v5/advanced-config


来源:https://stackoverflow.com/questions/53873741/how-to-extract-firebase-user-parameter-and-send-to-google-analytics-via-google-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!