简体   繁体   中英

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

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

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.

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