Should my GA property be defined as a website or mobile app? I've tried it both ways but I'm not seeing my Cordova based app reporting into GA.
GA tracking isn't part of our SDK and therefore questions around it are not covered by our forum.
Please have a look at other forums, e.g. stackoverflow instead.
Just create a default website GA account and enter the GA-key. You should see events arriving in real time. I just tested using a temporary test account.
Note that the tracked events should give you basic information about popular targets and augmentations. You will e.g. see which augmentations are loaded. Values of event/action/label may be hard to read, but I attached the convention.
Hope this helps
We followed these directions, and consulted WT documentation as well. However, our GA site isn't getting event data despite having put in the GA Key as required. Did we miss a step?
Are you using it as an offline package? That is how my project is structured and I'm not seeing it either.
Note that the tracking happens inside the JS context of the experience and will only work with active Internet (permission).
You may open tools.js, search for `Logger` and set `enabled` attribute to 'true' so that you can remote debug the webView. Additionally add some Logger.info lines to the `createGoogleAnalyticsSignalListener` function.
Hope that helps,
But I can assume that it should work just fine as an offline package when connected to the Internet?
we added the line
as documented in the official GA docs for that reason.
Please also check tracking during the preview of your experience via the Wikitude application.
OK, I have it working inside the Wikitude application so I'll try it in my app now. On a side note, is it possible to pass in a userid value into the tracking?
Unfortunately, there is yet no way to fire custom events.
You may adjust the tools.js manually and add define custom variables though.
However, I recommend sticking to the vanilla template as are anyhow able to trace a user's app behavior by session.
Consider developing the experience by your own (compare SDK Sample Application) in case you need a custom tracking and interactive components.
I tried the Logger option and received the following.
Project - File loaded.
tools.js:100 REPORTING - Added GOOGLE ANALYTICS
tools.js:100 Tracker is active
tools.js:100 Tracker - loaded.
tools.js:100 TARGET recognized FeatureAuthor-Johnson
tools.js:100 Augmentation JSON - Loading starts
tools.js:100 Augmentation JSON - Bundled in metadata (for offline use)
tools.js:100 Augmentations - loaded overall 100
tools.js:100 Augmentations - Successfully created
tools.js:100 TARGET lost FeatureAuthor-Johnson
However, I still don't see tracking in GA. Is there any additional debugging you could recommend?
Does this comment is in tools.js have anything to do with it?
Also, when debugging the webview, I noticed there was no network traffic when inside the plugin.