Start a new topic

Google Analytics set up

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.


Best regards,

Andreas

I'm referring to the GA setup for the tracking code inside of my AR content. There is the option to add it from insid my AR project in the studio but it doesn't appear to populate GA.

Hi again,

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

event_info.png
(23.6 KB)

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,
Andreas


1 person likes this

Hi Andreas,


But I can assume that it should work just fine as an offline package when connected to the Internet? 


Thanks,

Logan

Yes,
we added the line
`ga('set','checkProtocolTask',null);`
as documented in the official GA docs for that reason.


Please also check tracking during the preview of your experience via the Wikitude application.


Best regards,


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.


Best regards,
Andreas

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? 


 

Note that the created ImageTracker has enabled flag set to FALSE. Set enabled to true (or call arTracker.start() ) to activate it.

Also, when debugging the webview, I noticed there was no network traffic when inside the plugin. 

Hi there!


I hope you made good progress during your investigation. In terms of userId passing: Tracking is implemented in a really simple way. Passing custom information from your native environment is not supported. You may customize the GA implementation to define session params etc. I recommend sticking to the vanilla template to avoid repetitive modifications on upcoming template updates.


Best regards,

Andreas

Login or Signup to post a comment