I've been getting weird results when running some custom segments over my app data in Google Anayltics. I have custom segments setup for specific app versions. e.g. Custom Segment -> Conditions -> App Version - exactly matches - 1.1.0
Using a secondary dimension of App Version on tables running against this segment, you would expect all the values to simply be 1.1.0. However my data also contains some values for 1.0.8 (my last build version before the minor update).
Reading the Google SDK docs on sessions (for iOS, but basically the same for Android) it states hits within 30 minutes are grouped into the same session. I'm guessing what is happening is people are opening the app, updating, and opening the new version all within 30 minutes, resulting in a single session with 2 different version numbers.
Is my guess about what is happening correct?
If so, is there a way to setup something within GA (server side) to trigger a new session when a specific dimension changes?
Or is it expected that you manually trigger a new session during every app launch?
1) yes.
2) if by "server-side" you mean "within the GA interface", then no.
3) Yes. dimensions are arbitrary data to give insight about visitors. They aren't meant to act as switches or the like. So you are expected to trigger a new session, because that's what it's there for.
And anyways, you should be triggering a new session start on each app open anyways. It's the equivalent of if a visitor were to go to a website, leave and then come back. In the web analytics world, reporters expect this to count as a new visit. Unfortunately, the way GA works, it doesn't count, because of that 30m timeout. And GA didn't offer a solution to this until Universal Analytics version (the one with ga() calls. There is no equivalent with _gaq.() calls, which is what most people still use :( ).
Related
So the app I am building for a client is in final stage of release. I would like to get some help from here about syncing the API with future updates on app. I will give a scenario:
Lets say our app is live with version 1.0.0 on both IOS and Android. Server keeps track of version number and if it does not match(will always be less if not updated) it tells to force update the app. Everything works. The problem arises here.
Lets say we need to provide some feature update on 1.0.1 we make the code ready on backend but does not make it live on production until the apps are live with new update otherwise old app might not work properly with new API changes. If any one of the app(lets say IOS) is live with v1.0.1 we need to make the backend live. It will work on IOS. But for Android if v1.0.1 is not live yet the old app will say to force update since version is already changed in backend. but since its still not yet live user are now stuck with force update screen.
The solution I came up with is to fire 2 express server with same code but 2 branches for production like production-ios and production-android.
How do you guys handle these kind of thing? Its my first big FullStack app and need to figure this out soon.
Cheers!
How exactly are you handling the app update version tracking?
Is it done via JSON or some other text file content?
JSON would be a better option to set multiple parameters like:
{
"app_update_details": {
"app_version": "1.0.1",
"ios": true,
"android": false
}
}
Parse this Json accordingly on your platform (Android, iOS).
This way you could the android flag to handle Android use cases & same for iOS.
I'm new to app dev...
I read somewhere in the doc: "...In most cases you want to use SharedPreferences as it is automatically backed up and migrated to new devices..."
On first install my app saves a few settings with SharedPreferences. It works great but if I uninstall the app or install it on another device the preference settings are lost.
How can I have these settings saved online within google somehow to be able to retrieve them if the user changes his phone or similar...
Could someone point me in the right direction ?
I read somewhere in the doc: "...In most cases you want to use SharedPreferences as it is automatically backed up and migrated to new devices..."
Your words "backed up and migrated to new devices" is nowhere written nor its true.
We use SharedPreferences in order to minimise the database operations, its like keeping variables handy.
On first install my app saves a few settings with SharedPreferences. It works great but if I uninstall the app or install it on another device the preference settings are lost.
If you wants to store or remember the device dependent settings, use device id / imei_id and store it on your web server mysql database
Even if user uninstalls app from the device and installs again anytime in future, make a call with async task to server by sending deviceid / imei_id and fetch its settings from mysql database and show it.
How can I have these settings saved online within google somehow to be
able to retrieve them if the user changes his phone or similar...
If user changes device, you can do nothing.
One way is, keep public device_id levels keys on server.
If user changes device and uses that key, then show him a response, this key is assigned to another device, but if you are the same, wait for our support
Call him, confirm he is the same old user with new device and delete his old entry from mysql and assign old key to the new device entry
Or use OTP SMS system to identify already existing customers with unique phone numbers
If OTP authentication code is correct then fetch settings for that user from the server, delete old mysql entry, modify new entry with old key and mobile number
This should be the your direction
Edit : 2 ##
I was hoping an easier solution exist but....
There is no short cuts for developers till the date, and it will be never.
Why, no short cuts / easy ways ?
Any device ( mobile, desktop / laptop / any AI device ) which is operated by a system software, is able to perform the tasks as per it is structured.
Ex : android is java based, obviously you can Make javascript based apps, but it is the extensions to the existing system, Android still has the base of Java virtual machine. ( Dalvic / Malvic like )
So, it is always better to use native java
Yes, Kotlin is best option now a days and better than hybrid approach
Every way has its own advantages, disadvantages
If you are developer, should go with native approach
Now your java code never knows, which version it is running on, so you have to, check android versions programming wise, and decide the flow for above Marshmallow & below marshmallow too, and it is explicitly done by developer by coding.
Ex, once user registers, he never shown please register again screen, it is not the magic, nor google, nor, java, nor android does anything, developer has decided, planned, architectured, designed, coded, tested that.
Even developers needs to take care of exceptions, you need to handle it in order to save your app from crashing.
In short developer is god, who creates his own universe, and everything is pre-planned and verified thats it.
You should use allowBackup = "true" in your manifest file. More details can be found here: AutoBackup
I am trying to create an experiment using Firebase remote config.
The criteria is as follows:
It should target only new users who have not used the app ( opening the app for the first time)
Now on further research I found that there is a user property as below:
However, this is not available in the experiment window or a similar property that fulfils the above criteria in the Firebase console as seen below:
I can only see the user properties set by my code. One way I can think of is to use one of my custom user property which is not yet set (but set to a value like null), but I don't know how I can do this.
References
https://support.google.com/firebase/answer/6317486?hl=en
https://firebase.googleblog.com/2016/10/better-user-targeting-with-firebase.html
I will share our experience with experiments for new users and how the different combinations of targeting work because we worked with it a lot already. You can skip the investigation part if you're not interested and just check the solution that we use now.
Our Investigations Part:
Firstly, when we integrated Firebase, we were afraid that Audiences won't work properly for experiments targeting cuz all current users will be treated as new ones after integration, so we checked several approaches and went with an approach of creating specific User Properties that we specified on the client side differently for old/new users. For instance, we created a User Property called adv_experiment_enrolled and specified on client side values 'enrolled'/'not_enrolled', so all new users after installation of this version became 'enrolled' and old ones after updating the version just became 'not_enrolled'. And we just used that User Property as targeting in an experiment. That worked well, but it wasn't a general approach that we could use easily for all experiments and we needed to create User Properties for each new experiment.
So we've tried the Audiences approach after few months of integration that was what #jackes described here with First Open Time user property:
https://stackoverflow.com/a/50075684/2723437
And we've got several problems, first of all, seems they had some troubles with populating of that kind of audience and just ~3-5% of new users were getting there. We also created an Audience depending on First Open event itself and used it too, it was populating better and was close to the real number of installs that we had. But we've noticed problems with this approach as well and the biggest one was that an experiment had only 20-30% of users from that Audience. We tested it and noticed by some of our metrics that seems users are not enrolled in this experiment in their first session cuz 1) Firebase takes some time to enroll a user in the Audience and 2) Remote Config has 12h cache by default, so it wasn't really a data for most of the new installations.
A solution that seems to work well for now:
We were surprised with that Firebase does have User Property for First Open Time, but doesn't allow to use this as the targeting for experiments (It would be very helpful to solve this problem tbh), so we just decided to try our good experience with User Property targeting and apply the general approach First Open Time user property, so we've created our own custom_first_open_time especially to target installations after some specific time (we just used current timestamps for platforms in seconds).
Important notes:
- You have to set up user properties before loading a remote config.
- You have to keep this first open time on the client side persistently once you generated it (usually you use NSUserDefaults/SharedPreferences for iOS/Android for that)
Sample of experiment configuration:
Didn't tried, but it should work. Create an Audience in Firebase Console with following condition: First Open Time is greater than or equal to some date. Where the date should be the next day after you starting an experiment.
Platform is currently hosted in developer's account who has one subscription and many other platforms beside mine so asking Azure support to do transfer is not the option. That being said i need to recreate whole thing on my new account. What is the best practice, standard procedure for this, one that will have the minimal downtime and impact on users? Any previous experience dealing with something like that? Thanks.
If you have all your resources in a resource group, you can export the ARM template. See https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-authoring-templates
Once you have the appropriate ARM template, you apply it to your new subscription, and it will recreate all the resources. Note that you will need to change names - the azurewebsites.net namespace is global (as are all DNS names), so you can't re-use the same name.
I have done this before.
Create a new subscription in the developer account
Move the services you want from the other subscription to this subscription (keep in mind some resources cannot be moved, so make sure you inventory all your items in the portal and see if they can be moved before you start this)
Transfer the new subscription into your new account.
Move the services from this new subscription to your production subscription
Delete the temporary subscription
Make sure to wait sometime between transfer steps, sometimes the transfer takes a long time and if you prematurely move things it will break and you will be in trouble.
You can do all this on your own
I am thinking of using RemoteConfig for these 2 purposes:
Have on the server a parameter minVersion of the app that should function. So for instance if v1.5 is broken and I release an update on Google Play as v1.6 I want to block access to 1.5 and older and force the user to update to 1.6 in order to use the app.
Have on the server, a parameter to store a message to display in the app. So for instance have a message like "We are having server maintenance, please wait a while". On app start, if the message parameter is not empty, show a dialog with it in the app.
Of course, in this case, on each app start I need to fetch the remote config values and check them.
Why use RemoteConfig? Because it's easy, it's free, it's convenient and I don't need to have another separate server for these 2 simple jobs.
So is this a valid use case?
Yes these are both valid cases.
For point 1, you can quite easily determine the users app version. I created a video detailing how to do it
https://youtu.be/McP11kcrMtk