I've integrated GoogleTagManager v5 in an iOS project. It's working fine, but now I see these logmessages in the Xcode console:
2017-07-14 09:09:19.285 App[23194:15302685] GoogleTagManager info: Loading container: GTM-XXX
2017-07-14 09:09:19.286 App[23194:15302665] GoogleTagManager info: Attempting to load saved version of container GTM-XXX
2017-07-14 09:09:19.310 App[23194:15302665] GoogleTagManager info: Processing logged event: gtm.load with parameters: (null)
2017-07-14 09:09:19.324 App[23194:15302665] GoogleTagManager info: Sending universal analytics hit: {
"&t" = screenview;
"&tid" = "UA-000000-1";
}
[...]
To reduce the amount of clutter in my console would like to change the loglevel for GoogleTagManager to warnings and errors only, but I can't find how to do this?
I've tried:
GAI.sharedInstance().logger.logLevel
but that doesn't have effect on these logs.FirebaseConfiguration.shared.setLoggerLevel
does silence Firebase logs, but not these GoogleTagManager logs.-FIRAnalyticsDebugDisabled
argument also doesn't have effect on GoogleTagManager logs.GoogleTagManager.h
file, but there only seems to be one protocol in the TagManager CocoaPod since v5. So no logging options there.Any ideas on how to change the Google Tag Manager log level or how to disable logging entirely?
The only answer that I was able to find is a dark magic with swizzling: https://stackoverflow.com/a/45411324/1016656
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