trackView() doesn't track
See original GitHub issuePlugin is not tracking views. Events are working fine. web-app (ofc not using the plugin) is working fine.
google reports http status -1 (not always), which seems not to track. Also if sometimes it’s tracking at least the intial load, it never reports the correct active page or page title, it always takes it out of the title-tag (basically sends a hit without paramters).
I’ve also got a warning which i cant really place (also only sometimes):
Aug 8 10:57:12 iPhone *[2171] <Warning>: INFO: GoogleAnalytics 3.14 -[GAIAnalyticsPropertiesStore propertyRecordForTrackingId:] (GAIAnalyticsPropertiesStore.m:464): Record for tracking id UA-* not found
Current log was using the sample line with “Screen Title”. I tried multiple different variations.
My implementation is pretty basic atm as I had to ditch ngCordova for it (they’re still using windows.analytics)
var d = $q.defer();
$window.ga.startTrackerWithId(GA_ID, function (response) {
d.resolve(response);
}, function (error) {
console.log("startTrackerWithId err -> " + error);
d.reject(error);
});
$window.ga.trackView('Screen Title');
var d = $q.defer();
$window.ga.trackEvent(category, action, label, value, function (response) {
d.resolve(response);
}, function (error) {
console.log("trackEvent err -> " + error);
d.reject(error);
});
Aug 8 11:28:18 iPhone *[2203] <Warning>: Apache Cordova native platform version 4.2.0 is starting.
Aug 8 11:28:18 iPhone *[2203] <Warning>: Multi-tasking -> Device: YES, App: YES
Aug 8 11:28:18 iPhone *[2203] <Warning>: Using UIWebView
Aug 8 11:28:18 iPhone *[2203] <Warning>: [CDVTimer][handleopenurl] 0.142992ms
Aug 8 11:28:18 iPhone *[2203] <Warning>: Unlimited access to network resources
Aug 8 11:28:18 iPhone *[2203] <Warning>: Unlimited access to network resources
Aug 8 11:28:18 iPhone *[2203] <Warning>: [CDVTimer][intentandnavigationfilter] 3.185034ms
Aug 8 11:28:18 iPhone *[2203] <Warning>: [CDVTimer][gesturehandler] 0.189006ms
Aug 8 11:28:18 iPhone *[2203] <Warning>: [CDVTimer][statusbar] 53.615034ms
Aug 8 11:28:18 iPhone *[2203] <Warning>: [CDVTimer][keyboard] 1.789987ms
Aug 8 11:28:18 iPhone *[2203] <Warning>: [CDVTimer][socialsharing] 73.350012ms
Aug 8 11:28:18 iPhone *[2203] <Warning>: Currently running release version 2016.08.08-11.26.10
Aug 8 11:28:18 iPhone *[2203] <Warning>: [CDVTimer][TotalPluginStartup] 158.453047ms
Aug 8 11:28:26 iPhone *[2203] <Warning>: startTracker ; UA-*
Aug 8 11:28:26 iPhone *[2203] <Warning>: THREAD WARNING: ['UniversalAnalytics'] took '10.887939' ms. Plugin should use a background thread.
Aug 8 11:28:26 iPhone *[2203] <Warning>: INFO: GoogleAnalytics 3.14 -[GAIReachabilityChecker reachabilityFlagsChanged:] (GAIReachabilityChecker.m:159): Reachability flags update: 0X000002
Aug 8 11:28:26 iPhone *[2203] <Warning>: Error during update: The operation couldn’t be completed. (HCPPluginError error -1.)
Aug 8 11:28:36 iPhone *[2203] <Warning>: INFO: GoogleAnalytics 3.14 -[GAIBatchingDispatcher hitsForDispatch] (GAIBatchingDispatcher.m:368): No pending hits.
Aug 8 11:30:14 iPhone *[2203] <Warning>: trackView
Aug 8 11:53:03 iPhone *[2228] <Warning>: VERBOSE: GoogleAnalytics 3.14 -[GAIBatchingDispatcher persist:] (GAIBatchingDispatcher.m:517): Saved hit: {
parameters = {
"&_crc" = 0;
"&_s" = 3;
"&_u" = ".oKoDK9BL";
"&_v" = "mi3.1.4";
"&a" = 1708808294;
"&aclid" = "<null>";
"&aid" = "de.*";
"&an" = *;
"&anid" = "<null>";
"&ate" = "<null>";
"&av" = "1.0.1";
"&cc" = "<null>";
"&cd" = "Screen Title";
"&ci" = "<null>";
"&cid" = "edd1f599-e117-4edb-b17a-a6b679ad325c";
"&ck" = "<null>";
"&cm" = "<null>";
"&cn" = "<null>";
"&cs" = "<null>";
"&dclid" = "<null>";
"&dm" = "iPhone6,2";
"&ds" = app;
"&gclid" = "<null>";
"&gmob_t" = "<null>";
"&idfa" = "<null>";
"&sr" = 640x1136;
"&t" = screenview;
"&tid" = "UA-*";
"&uid" = 51;
"&ul" = "en-de";
"&v" = 1;
"&z" = 13653181779649986564;
gaiVersion = "3.14";
};
timestamp = "2016-08-08 09:53:03 +0000";
}
Aug 8 11:53:12 iPhone [2228] <Warning>: VERBOSE: GoogleAnalytics 3.14 -[GAIRequestBuilder requestPostUrl:payload:compression:] (GAIRequestBuilder.m:167): building URLRequest for https://ssl.google-analytics.com/batch
Aug 8 11:53:12 iPhone *[2228] <Warning>: VERBOSE: GoogleAnalytics 3.14 -[GAIBatchingDispatcher dispatchWithCompletionHandler:] (GAIBatchingDispatcher.m:632): Sending hit(s) POST: https://ssl.google-analytics.com/batch
Aug 8 11:53:12 iPhone *[2228] <Warning>: INFO: GoogleAnalytics 3.14 -[GAIBatchingDispatcher didSendHits:response:data:error:] (GAIBatchingDispatcher.m:226): Hit(s) dispatched: HTTP status 200
Aug 8 11:53:12 iPhone *[2228] <Warning>: INFO: GoogleAnalytics 3.14 -[GAIBatchingDispatcher deleteHits:] (GAIBatchingDispatcher.m:529): hit(s) Successfully deleted
Aug 8 11:53:12 iPhone *[2228] <Warning>: INFO: GoogleAnalytics 3.14 -[GAIBatchingDispatcher didSendHits:] (GAIBatchingDispatcher.m:237): 3 hit(s) sent
Issue Analytics
- State:
- Created 7 years ago
- Comments:26
Top GitHub Comments
Google seem to have changed it so that app and web views can be amalgamated. They say here:
I’m using this plugin to send TrackViews to a web property but they’re not appearing. 😦
EDIT: In order to see these, you have to create a new “View” in Google Analytics for app data. At that point the live stream will show page views fine.
OHH, I think you have the wrong config; you are using a web app GA instead of the movil app GA.
Mobile app use the concept of screen instead of page view. You need somehow to change the type or create a new tracking.