Firebase Cloud Messages with Analytics and user properties - firebase

I'm using Firebase Analytics and User Properties in my app to collect some data and to see how the users are using the app etc.
My app has both Free Version and Pro version. Before hire the Pro version, the user can use the Pro Version as a Trial of 1 month. When the user starts the Free Trial, I'm creating a event named "started_free_trial" and with this event I'm sending a "created_at" event attribute equal to System.currentTimeInMillis().
Now I want to send the cloud notifications from the Firebase console to the users who are using the trial period of Pro version at intervals of 15 days, 25 days and 30 days from the free trial start.
So here are the points what i want to do exactly
Create a Audience of users who started the Trial 15, 25 and 30 days ago. Can I do that? As Firebase provides an option to create audiences but I don't know how to create such type of audience to filter according to my requirement.
I want to send notification to that above created audiences.
I need your help to complete/perform above 2 points.
Looking for positive response.
Thanks

You can't really create an audience based on time the user started using your app, since the audiences are sticky, once a user is in the audience she will remain there forever.
However, instead of targeting to an audience, you can use user property directly to target your notification to users that registered after certain time or before certain time.
Just make you app to store the first start time to user property and the use that as the condition. You can also create other relatewd conditions and combine them.

Related

Firebase Remote-Config crash free users

I'm trying to display a "Rate Me" popup to most active users that haven't received crashes recently.
I can easily track how active an user is by using analytics and conditions, and setting a remote-config flag to true.
Is there a way to create an audience or a condition to select users without crashes?
Yes, you can do this by creating an exclusion group in your Analytics audience that excludes users who have logged an app_exception event within a specific timeframe.
The best way to do this, assuming you're already creating an audience for the active users you want to target, is to add on the exclusion group to that audience as well to remove users who have experienced a crash recently.
See attached screenshot for an example from the Firebase console.

Saving statistics to Google Analytics

I'm relatively new to Google Analytics and would like to have some inputs.
So I have a web application that people can install to create a backup and can do restores as well. The application has an API where you can see the statistics of the app i.e. number of backups made, restores made, and the number of clusters connected to this application.
Now I want to send these stats to google analytics with an interval of 10 minutes. I was wondering if I can send the status to Event with a unique UUID as Event Category, the backup/restores, or nodes as Event Labels and the number as Event Actions.
Is this the right approach to using Google Analytics Events? Or is there a better way to do it in GA? My requirement is I have to do it in GA or should I use a different hit type.
Given that we are talking API's you intend to use the Measurement Protocol?
And the UUID refers to the unique user? if so, you should look at the uid https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#uid
As to using Events versus Hits, using hits is probably easier on the reporting.

Hierarchy of Google Analytics for Multiple Builds of Same App

I am setting up Google Analytics Accounts for a Product which have multiple builds as frontend for same user base.
So we have one Product called X and have:
Web Build
Mobile Web
Android App 1
iOS App 1
Android App 2
iOS App 2 6.
The main point is identical APIs and User base is used in all platforms and apps. So if we have a user John Doe he can login in any of the web or apps.
We want to extract following information from Google Analytics.
Under User ID feature want, sessions aggregations of that user around all build and apps, but identifiable. So I can know that user John login to web yesterday and used mobile app today.
Each user belong to a customer (company) in our system. So want to segregate all information based on companies.
I already have achieved point 2 by creating a custom dimension in Google Analytics and believe that's the best way to do it.
Now need suggestions from Gurus on how to acheive point 1 using Google Analytics.
Either use single account and single property for all builds and apps
If yes, then how to identify those apps and builds in sessions
If I use multiple properties/apps in GA account then how to aggregate user sessions among all?
Looking forward to hear how guys around hand or should have handled this scenario. Cheers!
This question is extremely broad, IMO any answer your going to get is going to be primarily opinion based. So here is my opinion and a little extra info to boot.
The first issue you are going to have is that there is a difference between Mobile google analytics accounts and web analytics accounts. The two do not mix. Mobile analytics accounts insert screen views with a screen name. While web accounts insert PageViews with a document location.
There is no way to analyze between two different Google analytics web properties. Unless you intend your android and ios apps to run as websites and send it like its a webpage its not going to work. You could potentially download the data into your own system or big query and analyze it there. Comparing your custom dimension to see what the users have done differently. I would wonder at the quality of the analysis you will get as there will be no real way for you to compare the data and match it up beyond using your custom dimensions user id and possibly date.
I am adding this because I am not sure what your saving in your custom dimension.
The second issue you are going to have is tracking. Google analytics TOS does not allow you to send any identifiable information to Google.
The Analytics terms of service, which all Analytics customers must adhere to, prohibits sending personally identifiable information (PII) to Analytics (such as names, social security numbers, email addresses, or any similar data), or data that permanently identifies a particular device (such as a mobile phone’s unique device identifier if such an identifier cannot be reset).
You could for example send your companies customer id for John as a user_id but user_id is an internal valuable used for internal processing this is not something you can extract out via the api.
The User ID enables the association of one or more sessions (and any
activity within those sessions) with a unique and persistent ID that
you send to Analytics.
To implement the User ID, you must be able to generate your own unique
IDs, consistently assign IDs to users, and include these IDs wherever
you send data to Analytics.
For example, you could send the unique IDs generated by your own
authentication system to Analytics as values for the User ID. Any
engagement, like link clicks and page or screen navigation, that
happen while a unique ID is assigned can be sent and connected in
Analytics via the User ID.
The best you could do would be to create a custom dimension and send that with every hit username=johnscustomerId. Which you appear to have already done. This is what I have done in the past and it works perfectly well.

Using firebase to show all active page visitors on shopify site?

I am trying to see if its possible to use Firebase to show the number of active users in real time on my shopify site. I also want to show the active users on a single product page if thats possible.
I see the Firebase example code for Presence but it looks like this only works for logged in users. How do I or is it even possible to show the real time user count ignoring whether someone is logged in or not...similar to the real time google analytics count?
The Firebase presence samples (one, two, three) all rely on the Firebase onDisconnect() handling. This method allows you to specify write/delete actions that should happen to your Firebase data on the server, once it detects that the connection to a client has been lost.
A system like this can work fine with using Firebase Authentication, but you need some way to uniquely identify each user. This can be any sufficiently random identifier, or for example the uid generate by Firebase's anonymous authentication. Both serve the same goal: authentication without identifications. That last approach is somewhat similar to how many analytics services work: they give you a unique ID when they first see you and then track you by that ID.

Authorization and charging flow with Shopify

I am developing an addon for Shopify platform and using the Shopify NET library I have managed to authorize the user shop and gather some data.
Now I need to charge the usage of the Addon with a monthly fee (providing 7 days trial) but I cannot figure out the flow I must follow.
I guess that I have to call Recurring Application Charge API after the user authenticates (at the callback from the authorization URL) and if the user declines the charge then I have to log him out. Is that correct?
Do I have to care for providing 7 days trial by myself or the Shopify RACharge API with manage it by itself?
What do I have to do when the user cancel the subscription or freeze it?
Can anyone point me out a document that analyze the charging flow except the Shopify Billing API which is not that helpful after all?
First question, you're right. You either have to log out the user or you just let him authed without permission to see some views or all of them.
There's a propperty on Recurring Application which allows you to define the days of the trial: "Number of days that the customer is eligible for a free trial.", so Shopify handles this for you.
When user cancels a subscription or his store is put on "frozen" status, you should make sure he doesn't have access to your App functionalities, though if it's frozen, he won't even be able to log into his store.

Resources