Let me start by saying that I know how to use the iOS SDK, so please don’t respond to this with “just use the SDK”. I want to know why Google Analytics is not working.
Here is my setup. I have a web app that is also baked into an Android app and an ios app through webview. I use cordova. Android application works fine with GA JS code. The web works just fine. However, from iOS, events or pageviews are not displayed. I heard that GA is domain bound, so is iOS Webview doing something under the hood in the domain?
I was going to attach my code snippet, but it is coffeescript in several classes, so I just paste the compiled js
Analytics.prototype.track = function(args) { window._gaq.push(args); }; Analytics.track(['_trackEvent', 'SubscriptionModal', "Closed", data]);
This works great on the Internet and Android, so it is not JS. I set GA _setDomainName to "focusatwill.com" and see that both ios and web have the domain "www.focusatwill.com"
I read online a few people who talked about this problem, and everyone says that they just use the SDK. I am looking for a reason why this is not working. How do you fix it to use JS?
change
I should mention that html and JS are not baked on the device, i.e. they do not have a local url, but they are served from our web server
source share