Firebase-ios-sdk: FR: SPM support for GoogleTagManager and libGoogleAnalytics.a

Created on 5 Oct 2020  路  11Comments  路  Source: firebase/firebase-ios-sdk

Feature status request

  • ~Firebase~ Google Component: GoogleTagManager, GoogleAnalytics (libGoogleAnalytics.a)

I am raising this issue here with knowledge that this is not part of your team but that you are able to contact the Google team. We have not had a reply on our ticket for over a month and there has never been any indication or any real support for these Google libraries on the Apple ecosystem.

We run a large-scale AppCommerce platform where a number of our clients pay for GA360 or use GTM. We would like to move away from all the pain caused by Carthage and Cocoapods to SwiftPackageManager. Apologies for raising this here but we are looking for any sort of acknowledgement or status for this issue from the Google team.

tagmanager feature request

All 11 comments

Hey, thanks for submitting this issue. In the past, for issues that are related to Tag Manager, we've been able to directly resolve them even though they're not part of Firebase because the Analytics team happens to jointly own the Tag Manager codebase (though this could change in the future). As far as I know we've also had exactly one Google Analytics issue that we resolved by submitting a bug fix to their codebase.

This issue is differs from the previous examples because it's a feature request with a significant scope, and even if I were able to get the Google Analytics team to respond to your ticket it's likely they do not have the bandwidth to add SPM support within the next year. Similarly, it's not something we can address by submitting a concise bug fix patch to their codebase. Instead of contacting them on your behalf, I think it would be more productive and on-topic to help you move off of the Google Analytics SDK to Firebase Analytics instead.

I'm not aware of any features Google Analytics' client SDK has that Firebase Analytics does not, and you can use Google Analytics console with Firebase Analytics data by linking your Google Analytics account to Firebase. Is there anything blocking you from moving off of Google Analytics?

Thank you for such a quick and concise response!

With regards to GA I will check in with the team tomorrow, but I suspect the only blockers may be around knowledge sharing with those clients (I believe there are only a few clients that have not yet moved to Firebase).

However, many of our clients do actively use GTM, which has a dependency on GA amongst a number of legacy libraries. I don't believe Firebase offers any replacement for GTM?

Tag Manager's hard dependency on Google Analytics means you're stuck. The only way to migrate to SPM from there would be to integrate Google Analytics and Tag Manager manually and do everything else through SPM, but that comes with its own caveats.

I know it's not what you want to hear, but unfortunately there isn't a better solution for your use case. If you need help manually integrating TagManager + GoogleAnalytics, feel free to ask in this issue thread as well.

Just to leave a little feedback on this issue before closing it off(I'm a Product Manager at Josh's company), we have migrated our clients to Firebase whilst continuing to support GA for the clients we have that pay for 360. The issue here is that there is a big reluctance from clients to use Firebase for analytics. The console is really poor for retail clients. GA surfaces eCommerce data extremely well, including information on products, orders etc. Even understanding version adoption and devices statistics seems more difficult in Firebase. Firebase makes it really difficult to see your data in meaningful ways, the console needs a lot of improvement for retailers to want to use.

Hey Chris, have your users tried the account linking I mentioned above? It will let you view your Firebase Analytics data in Google Analytics console.

@morganchen12 Are you saying that if we make this link then apps don't need to install the Google Tag Manager SDK?

It depends on what you're using GoogleTagManager for. If you're deploying and managing tag containers and expect to see tags from FirebaseAnalytics-integrated apps, you will still need to use Tag Manager. Otherwise you're probably able to drop it without issue.

I'm still unclear on how Tag Manager works overall, but I think my particular use case is using containers. That there are no installation instructions beyond "use Cocoapods" is super disappointing to me. Do you know of any manual-install directions to get the GTM SDK into an iOS app's codebase @morganchen12?

I do not. There is a binary TagManager SDK download on their website, but it has not been updated since 2016. You can try to grab the binary from the download url in the TagManager podspec and then manually integrate that instead. Note that if you do this you will need to also manually install GoogleAnalytics.

Thanks @morganchen12. I notice that the Google Analytics library that's depended on by the GTM pod has the GTM symbols inside as well so I'm getting duplicate symbol errors. Is it safe to just not use the GTM binary and use the linked analytics one? (The analytics podspec is the one at https://github.com/CocoaPods/Specs/blob/9543734012238c33ea018af5a4381459c13f0916/Specs/3/2/c/GoogleAnalytics-iOS-SDK/3.12/GoogleAnalytics-iOS-SDK.podspec.json)

Was this page helpful?
0 / 5 - 0 ratings