Send GA events in real time to custom API

283 views
Skip to first unread message

Lir

unread,
Aug 24, 2020, 1:27:23 PM8/24/20
to Firebase Google Group
I'm trying to figure our how to send App events (clicks, activities...)
in real time with the user's id to a my server using rest API.
It is feasible using JS custom variable in GTM.

Is it possible using GTM also for Apps? if so, can you share an example
If not, Is it possible using Firebase?

Kato Richardson

unread,
Aug 24, 2020, 2:11:06 PM8/24/20
to Firebase Google Group
Hi Lir,

I don't think anybody in Firebase is well versed on Tag Manager (GTM). Not sure where it fits in the pipeline and how realtime it is (I suspect not at all). You can definitely use BigQuery intraday tables to stream realtime analytics. 

Additionally, if the goal is to contact your server via REST, why not just do that directly from the client instead of adding hoops?

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/ef09ae6d-eff8-40e7-8b3b-3e0e8f64a782n%40googlegroups.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Lir

unread,
Aug 25, 2020, 4:53:43 AM8/25/20
to Firebase Google Group
Hey Kato,

Thanks for replying :)

The reason is to leverage tag management already configured in GTM. 
Otherwise, sending full click-stream traffic to my API, and not specific cases, will require building a new tagging mechanism.
Besides, the data on Big query is available after 15-30 minutes. guaranteed time is 4.5 hours...

So, if it's working in real-time from web browsers, maybe this flow: App (click event) -> firebase -> GTM -> App function call -> send data to api from device,  could work...!
Two other options are  - 
1) firebase RT database with servlets listening to each update 
2) sdk to forward all events (as you've mentioned).

when an event is sent to firebase using the firebase SDK, how does it connects to GTM? 
unfortunately, the whole data flow is obscure. I didn't find formal documentation.
There's a flow diagram here, but it is missing the cloud containers/firebase RT DB and is not addressing the availability time.

Still searching for more clues :)

Kato Richardson

unread,
Aug 25, 2020, 11:39:49 AM8/25/20
to Firebase Google Group
Everything you've said here makes a great deal of sense. I doubt there are any GTM experts who can help on this list (here's hoping) who can speak authoritatively on the topic. 

Your goals here are still not clearly stated and we're still working in a proposed solution instead of the use case you need to solve. So it's going to be hard to be very prescriptive.

After some querying and reading, I'm certain that if the goal is realtime, that the intraday tables in BigQuery are likely faster than GTM. There is no indication in any GTM doc that it does anything in realtime streams. The BQ tables certainly don't take 4 hours and 15m seems long from what I've seen so far.

If you need something faster, then Realtime Database (for speed) or Firestore (for scale) might be a good answer. But this is, again, no different than directly contacting your API surface in that you're going to have to put some logic on the client to send out the events to one of these resources, so I'm back to suggesting that you just ping the rest API directly whenever you log the events.

☼, Kato



Reply all
Reply to author
Forward
0 new messages