Google Analytics iOS SDK 3.12 data not showing in dashboard
I have implemented Google Analytics in an app.
The problem is I can't see anything in the Google Analytics dashboard.
Here are the logs I see in Xcode: ("..." are the values ββthat I replaced)
2015-07-02 20:55:28.091 AppName[1619:931478] VERBOSE: GoogleAnalytics 3.12 -[GAIBatchingDispatcher persist:] (GAIBatchingDispatcher.m:517): Saved hit: {
parameters = {
"&_crc" = 0;
"&_s" = 51;
"&_u" = ".oK9L";
"&_v" = "mi3.1.2";
"&a" = 1809611894;
"&aid" = "...";
"&an" = ...;
"&av" = "3.0.3";
"&cd" = Home;
"&cid" = "...";
"&dm" = "iPad3,4";
"&ds" = app;
"&sr" = 2048x1536;
"&t" = screenview;
"&tid" = "...";
"&ul" = fr;
"&v" = 1;
"&z" = 14083819698118597511;
gaiVersion = "3.12";
};
timestamp = "2015-07-02 18:55:28 +0000";
}
2015-07-02 20:55:36.043 AppName[1619:931478] VERBOSE: GoogleAnalytics 3.12 -[GAIRequestBuilder requestPostUrl:payload:compression:] (GAIRequestBuilder.m:167): building URLRequest for https://ssl.google-analytics.com/batch
2015-07-02 20:55:36.045 AppName[1619:931478] VERBOSE: GoogleAnalytics 3.12 -[GAIBatchingDispatcher dispatchWithCompletionHandler:] (GAIBatchingDispatcher.m:632): Sending hit(s) POST: https://ssl.google-analytics.com/batch
2015-07-02 20:55:36.077 AppName[1619:931363] INFO: GoogleAnalytics 3.12 -[GAIBatchingDispatcher didSendHits:response:data:error:] (GAIBatchingDispatcher.m:226): Hit(s) dispatched: HTTP status 200
2015-07-02 20:55:36.078 AppName[1619:931478] INFO: GoogleAnalytics 3.12 -[GAIBatchingDispatcher deleteHits:] (GAIBatchingDispatcher.m:529): hit(s) Successfully deleted
2015-07-02 20:55:36.088 AppName[1619:931478] INFO: GoogleAnalytics 3.12 -[GAIBatchingDispatcher didSendHits:] (GAIBatchingDispatcher.m:237): 8 hit(s) sent
So I'm pretty sure the analytics data is being sent (somewhere ... on the server ... in space ...).
But I don't see it in the Google Analytics dashboard. I can see which screen I am on in the "Real Time" section, but I do not see global calls to the screen.
Here is the code in case you see something wrong:
// AppDelegate.swift
// Configure tracker from GoogleService-Info.plist.
var configureError:NSError?
GGLContext.sharedInstance().configureWithError(&configureError)
assert(configureError == nil, "Error configuring Google services: \(configureError)")
// Optional: configure GAI options.
var gai = GAI.sharedInstance()
gai.trackUncaughtExceptions = true // report uncaught exceptions
gai.dispatchInterval = 10
gai.logger.logLevel = GAILogLevel.Verbose // remove before app release
// Analytics.swift
class Analytics {
static let sharedInstance = Analytics()
init() {
GAI.sharedInstance().trackerWithTrackingId("...")
}
func trackView(viewName: String) {
println(viewName)
let tracker = GAI.sharedInstance().defaultTracker
tracker.set(kGAIScreenName, value: viewName)
var builder = GAIDictionaryBuilder.createScreenView()
tracker.send(builder.build() as [NSObject : AnyObject])
}
}
+3
source to share