question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

trackView() doesn't track

See original GitHub issue

Plugin 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:closed
  • Created 7 years ago
  • Comments:26

github_iconTop GitHub Comments

2reactions
pugwonkcommented, Jan 18, 2018

Google seem to have changed it so that app and web views can be amalgamated. They say here:

If you send web and app data for the same property (UA-XXXXX-Y), Google Analytics will display both sets of data in views for that property. This allows for combined app and web views.

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.

1reaction
victorsosacommented, Aug 9, 2016

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.

screenshot from 2016-08-09 10-36-12

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQs
TrackView is a cross-platform software app that connects your smart-phones, tablets and computers,into a mobile security system with great features such as ...
Read more >
TrackView: selectTrack
Sometimes it works, sometimes it doesn't, sometimes it finds some of the CAs… I guess the big caveat I'm fighting is that the...
Read more >
Saving/restoring track visibility without 'track view' prompt?
I'm using a very handy script that hides silent tracks during playback and then using saved track views to save which tracks are...
Read more >
How to set up TrackView HomeSafe settings? - YouTube
Note: You can watch "How to use TrackView Viewer" to download ... TrackView -Video Monitoring, Cloud Recording and Location Tracking.
Read more >
Google Analytics: Tracker not started - #15 by reedrichards
trackView is not doing anything. Not an error, nothing. GoogleAnalytics.trackView(page_name + "_" + platform).then((_success) => { console.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found