1

I use Google Tag Manager Server Side for receiving events from different event streams (Google Analytics for WEB, Google Analytics Measurement Protocol). I wonder if I can send events to my GTM Server with Firebase Analytics for Android, since I want to keep things neat and unified. The SDK itself doesn't seem to have any option to setup a custom transport url the same way as in Google Analytics for web. Any recommendations?

Eugene Krall
  • 503
  • 5
  • 20
  • Are you looking for https://stackoverflow.com/a/64764917? – Frank van Puffelen Nov 05 '21 at 16:19
  • @FrankvanPuffelen not this but related, but difficult to communicate and search for. Basically S2S is working great for me, but in some cases where i'm using more javascript with ES browser import maps, it's some times easy to use `firebase/analytics` methods. Every month I swear i get it working but then regresses. GTM server GA4 works great with metrics.mydomain.com, but with a new web data stream. I thought i was able to force a transport stream with passing options to constructor `getAnalytics(firebaseApp, {debug_mode: true, transport_url: 'https://metrics.example.tld'});` – Ryan Romanchuk Aug 22 '22 at 06:31
  • but now the browser is back firing requests off to googletagmanager.com again. It's surprisingly to step through when using Safari inspector – Ryan Romanchuk Aug 22 '22 at 06:36

1 Answers1

2

I suggest not doing it at the moment. To do it now, you would have to indeed switch from the FB SDK to using the measurement protocol, which is a lot more work for the developers.

Also, keep in mind that server-side GTM is still in active development. I followed up and it looks like they're planning to add clients for Firebase/Mobile SDKs, so it makes sense to wait till the new clients are available.

BNazaruk
  • 6,300
  • 3
  • 19
  • 33
  • Thanks. Looks like the right course of action. However, I've decided to go with GTM for Mobile SDK and implement Custom Function Call that will send events to GTM Server Side via Measurement Protocol (which itself is still in Alpha). – Eugene Krall Nov 15 '21 at 10:35
  • @BNazaruk Where did you find information about the Firebase development plan? – Thrasi Mar 09 '22 at 13:22
  • From the Measure Slack server. I think, it was Simo who told me about the plans. I'm sure the roadmap may be posted somewhere too. – BNazaruk Mar 09 '22 at 18:14
  • @EugeneKrall can you explain more on how did you implement Function Call that send events to sGTM using measurement protocol? – rootcoder Sep 23 '22 at 07:33