I integrated Firebase and GTM over cocoapods:
pod 'Firebase/Core'
pod 'GoogleTagManager', '~> 5.0'
Podfile.lock for the versions used :
- Firebase/Core (3.12.0):
- FirebaseAnalytics (= 3.6.0)
- FirebaseCore (= 3.4.7)
- FirebaseAnalytics (3.6.0):
- FirebaseCore (~> 3.4)
- FirebaseInstanceID (~> 1.0)
- GoogleInterchangeUtilities (~> 1.2)
- GoogleSymbolUtilities (~> 1.1)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- FirebaseCore (3.4.7):
- GoogleInterchangeUtilities (~> 1.2)
- GoogleSymbolUtilities (~> 1.1)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- FirebaseInstanceID (1.0.8)
- GoogleAnalytics (3.17.0)
- GoogleInterchangeUtilities (1.2.2):
- GoogleSymbolUtilities (~> 1.1)
- GoogleSymbolUtilities (1.1.2)
- GoogleTagManager (5.0.8):
- FirebaseAnalytics (~> 3.0)
- GoogleAnalytics (~> 3.0)
- GoogleUtilities (~> 1.3.0)
- GoogleToolboxForMac/Defines (2.1.1)
- GoogleToolboxForMac/NSData+zlib (2.1.1):
- GoogleToolboxForMac/Defines (= 2.1.1)
- GoogleUtilities (1.3.2):
- GoogleSymbolUtilities (~> 1.1)
and followed the steps in documentation for the integration but i am having non-stop warning of :
GoogleTagManager info: Processing logged event: (null) with parameters: (null)
<FIRAnalytics/WARNING> Attempted to log nil event
Full Log from app start:
Firebase automatic screen reporting is disabled. UIViewController transitions will not be automatically logged. To report screen transitions manually, call +[FIRAnalytics setScreenName:setScreenClass:
setupFirebase (670139-com.apple.main-thread)
<FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
<FIRAnalytics/INFO> Firebase Analytics v.3600000 started
<FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see ...)
<FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
<FIRAnalytics/INFO> Firebase Analytics enabled
GoogleTagManager info: Loading container: GTM-XXXXXXX
GoogleTagManager info: Attempting to load saved version of container GTM-XXXXXXX
GoogleTagManager info: Processing logged event: gtm.load with parameters: (null)
GoogleTagManager warning: Invalid Event name: gtm.load (Must not start with an underscore and must consist of letters, digits and/or underscores)
Should commit UiContext but SignalR is disconnected: nil (670139-com.apple.main-thread)
: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x125947998) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x125769880). One of the two will be used. Which one is undefined.
<FIRAnalytics/WARNING> setScreenName:screenClass: must be called after a view controller has appeared
GoogleTagManager info: Processing logged event: openScreen with parameters: {
System group container for systemgroup.com.apple.configurationprofiles path is /Users/xxx/Library/Developer/CoreSimulator/Devices/5F44EFE3-0BDF-402A-A01B-8F6EABB31B22/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
Reading from private effective user settings.
SignalR :: Connected (670139-com.apple.main-thread)
GoogleTagManager info: Processing logged event: _s with parameters: {
<FIRAnalytics/ERROR> Event name is reserved. Ignoring event: session_start
GoogleTagManager info: Processing logged event: (null) with parameters: (null)
<FIRAnalytics/WARNING> Attempted to log nil event
<FIRAnalytics/WARNING> Attempted to log nil event
GoogleTagManager info: Processing logged event: (null) with parameters: (null)
<FIRAnalytics/WARNING> Attempted to log nil event
GoogleTagManager info: Processing logged event: (null) with parameters: (null)
<FIRAnalytics/WARNING> Attempted to log nil event
EDIT
I removed the ".json" extension from the config file. Logs said :
GoogleTagManager warning: No default container found. Container needs to be added to a container folder and added to the target.
Configuration was not found in database. The configuration will be fetched from the network when necessary
Firebase Analytics is ready to receive events
Firebase Analytics enabled
Fetching configuration from the server
Downloading data. Host: https://app-measurement.com/config/app/1:...
Successful fetched configuration from the server. Got network response. Code, size: 200, 106
Successfully parsed a configuration. Version: 1484056.........
Measurement data sent to network
Successful upload. Got network response. Code, size: 204, 0
any ideas ???
but errors are gone ???
Any ideas
EDIT 2
Upgraded Pods to latest :
- Firebase/Core (3.14.0):
- FirebaseAnalytics (= 3.7.0)
- FirebaseCore (= 3.5.1)
- FirebaseAnalytics (3.7.0):
- FirebaseCore (~> 3.5)
- FirebaseInstanceID (~> 1.0)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- FirebaseCore (3.5.1):
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- FirebaseInstanceID (1.0.9)
- GoogleAnalytics (3.17.0)
- GoogleSymbolUtilities (1.1.2)
- GoogleTagManager (5.0.8):
- FirebaseAnalytics (~> 3.0)
- GoogleAnalytics (~> 3.0)
- GoogleUtilities (~> 1.3.0)
- GoogleToolboxForMac/Defines (2.1.1)
- GoogleToolboxForMac/NSData+zlib (2.1.1):
- GoogleToolboxForMac/Defines (= 2.1.1)
- GoogleUtilities (1.3.2):
- GoogleSymbolUtilities (~> 1.1)
But still getting reserved event Errors :
2017-03-02 11:00:17.854 <Error> [Firebase/Analytics][I-ACS013006] Event name is reserved. Ignoring event: user_engagement
2017-03-02 11:00:17.854 GoogleTagManager info: Processing logged event: (null) with parameters: (null)
Funny thing is Firebase is ignoring event which :
:(
In my case the problem was because of including files in a wrong way. Just be sure to include container folder properly. A tip : folder icon color shall be blue in project navigator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With