I’m new to Simple Analytics and excited to get it integrated! However, my main need is for analytics for my mobile app. If it is relevant, I use Titanium SDK to make cross platform apps and most of my UI is in a Webview with the HTML/Javascript hosted on the user’s device (not a remote webpage). Initially I thought that I’d just put the normal webpage script tags in and everything would just magically work when called the sa_event() methods. However, I didn’t think that I was getting the expected visitor, pageview and live pageview information, so I switched to the server side api. I’m currently calling the Server Side API and seeing events and page views closer to what I’m expecting, but I’m not sure that I’m using the API correctly. There is never a “time on page” in the dashboard and when I was passing the “unique” parameter with “pageview” events, the visitor count would go up with every new page. This is what I’m doing right now:
Button clicks send a payload with:
{
“type”: “event”,
“hostname”: “mobileapp.mydomain.com”,
“event”: “Button Name Click”,
“metadata”: {},
“ua”: “my custom user agent string”,
“unique”: false
}
And when a new view/page in the app is opened I have a payload like:
{
“type”: “pageview”,
“hostname”: “mobileapp.mydomain.com”,
“event”: “pageview”,
“metadata”: {},
“ua”: “my custom user agent string”,
“unique”: false,
“path”: “/myViewName”,
}
I also do a “pageview” like above when the app first starts with a “unique” of true to register as a new visitor.
If anyone has run into this with analytics for mobile apps before, I’d really appreciate it if you could help me out with the below questions:
- Is this strategy of only registering a unique pageview when the app starts how the “unique” parameter is intended to be used? I explicitly send a false for every other pageview, otherwise the visitor count increments as the user navigates around my app.
- Since this is a webview and using the server side api, there are no referrers. How does Simple Analytics know if there is a unique “visitor” using my app?
- Why does the “Time on page” in the dashboard never change with the way i’m doing this?
- The “Live pageviews” shows 1 when the app initially starts, but not as the user is navigating around the app, should i be able to see “live” activity here?
- I understand that since Simple Analytics is going out of their way to be safe and respectful, there isn’t much to request consent from users on. Do the Apple App store and Google Play store feel the same way? Or should I still indicate that analytics is collected during onboarding/first run of the app?
Thank you for your time! I’m eager to use Simple Analytics for my app!