I know that there are a lot of questions and answers about google analytics issues, but nothing helps me.
I have installed google with pods
pod 'GoogleAnalytics'
and imported this in bridging header, and use this code in appDelegate
<GoogleAnalytics/GAI.h>
"GAIDictionaryBuilder.h"
guard let gai = GAI.sharedInstance() else {
assert(false, "Google Analytics not configured correctly")
}
GAI.sharedInstance().defaultTracker = gai.tracker(withTrackingId: "UA-109196643-1")
// Optional: automatically report uncaught exceptions.
gai.trackUncaughtExceptions = true
GAI.sharedInstance().dispatchInterval = 20
GAI.sharedInstance().dispatch { (result) in
print(result)
}
// Optional: set Logger to VERBOSE for debug information.
// Remove before app release.
gai.logger.logLevel = .verbose;
here is the logging text
INFO: GoogleAnalytics 3.17 -[GAIBatchingDispatcher hitsForDispatch] (GAIBatchingDispatcher.m:369): No pending hits. INFO: GoogleAnalytics 3.17 -[GAIReachabilityChecker reachabilityFlagsChanged:] (GAIReachabilityChecker.m:161): Reachability flags update: 0X000002
and here is the log when I am logging screen
GoogleAnalytics 3.17 -[GAIBatchingDispatcher persist:] (GAIBatchingDispatcher.m:518): Saved hit: { parameters = { "&_crc" = 0; "&_s" = 9; "&_u" = ".npetoK9L"; "&_v" = "mi3.1.7"; "&a" = 1028296819; "&aid" = "******"; "&an" = Mataam; "&av" = "1.0"; "&cid" = "59cc9c6e-be21-4ac8-b6d9-d3beff894dbf"; "&dm" = "x86_64"; "&ds" = app; "&sr" = 1242x2208; "&t" = screenview; "&tid" = "UA-109196643-1"; "&ul" = en; "&v" = 1; "&z" = 15726875618543142345; Login = name; gaiVersion = "3.17"; }; timestamp = "2017-11-11 15:42:53 +0000"; }
So the problem is that I dont get any data in analytics, I have also setup firebase, can it be the issue, because I am getting data there.