Beginner Firebase User FCM Set-Up Questions - ios

FOR iOS
Notifications
Cannot see an option for in app pop up messsages - is it only push/re-engagement message types?
Can the notifcations be automated not just scheduled one by one? Can this be done programatically? I.e. Something left in basket so send automatic push
Can the notifications be triggered based on in app user behaviour not just audience or property and can they have a time lag e.g. 3 days after trigger? I.e. User clicked on X promotion and hasn't returned in 2 days
Active Users 1, 7, 30 day
Accuracy of data - how reliable is the Firebase Active user data - what is the definition of actives reported?
Viewing new vs returning? Is this possible? I cannot find a view of this in the dashboard?
User Properties
When you add the code for the setUserProperty() once is is registered how does Firebase start to gather than data on this user property value?

Cannot see an option for in app pop up messsages - is it only
push/re-engagement message types?
FCM is for Notifications and data messages. At this time, if you want messages to appear in the app, you would use a data payload and handle the appearance of a pop-up within your code. See About FCM Messages for details on Notifications vs data messages.
Can the notifcations be automated not just scheduled one by one? Can
this be done programatically? I.e. Something left in basket so send
automatic push
From the console, you can schedule notifications. If you want to automate based on events, I suggest you use a combination of Cloud Functions for Firebase and the Admin SDK. Store the FCM tokens in the database for sending.
Can the notifications be triggered based on in app user behaviour not
just audience or property and can they have a time lag e.g. 3 days
after trigger? I.e. User clicked on X promotion and hasn't returned in
2 days
As for a delay, that would be something you'd have to handle in your own server.
Accuracy of data - how reliable is the Firebase Active user data -
what is the definition of actives reported?
According to the documentation, "An active user has engaged with an app in the device foreground, and has logged a user_engagement event."
Viewing new vs returning? Is this possible? I cannot find a view of
this in the dashboard?
No, this is not possible. You can see the first_open event and extrapolate from that.
When you add the code for the setUserProperty() once is is registered
how does Firebase start to gather than data on this user property
value?
According to the documentation, "User properties are effectively sticky event parameters that are automatically logged when you call logEvent."

Related

Firebase Cloud Messaging Notifications for iOS not showing opened and analytics

I'am using FCM to send notifications to iOS apps. The notifications are received on the device well, but I can not get the "Opened" or "Conversion " rate in the Notification console GUI. It always shows "0 opened" and "0 Conversion" for almost 200 0000 notifications sent.
I double checked all the implementation but I can't get it working.
I have FirebaseAppDelegateProxyEnabled set to YES in plist. I implemented all the methods listed on Firebase guides and docs.
I don't have any notification related events showing in the Firebase analytics pane either.
To enable Open count metric in Cloud Messaging > Reports, you need to mark notification_open event as conversion in Analytics > Events:
That's the event automatically generated by Firebase but not enabled by default.
It looks like you need to do some additional setup.
Conversion events
When composing a notification, it is important to think ahead and define which metric to use to assess its effectiveness. A Conversion event is an event or user action that you want to track to further measure and evaluate.
A built-in Notifications funnel analysis automatically reports Notification sent and Notification opened events. You can provide an optional conversion event that you want to analyze with the Notifications funnel analysis.
An Analytics User Property firebase_last_notification is automatically created when you send a notification from the Notifications console the first time. This identifies the most recent notification opened by the user, allowing proper notification attribution of the conversion events.
See Conversion Events to learn more conversion events and steps to take to enable conversion.
Prerequisite: Make sure your app has integrated the Firebase Cloud Messaging SDK, which enables automatic reporting of these notification-related events for the funnel analysis.
Following the link to learn more about 'Conversion Events' you'll read:
Enable events as conversions
Conversions are your most important events. By designating an event as a conversion, you facilitate attribution reporting and postback capacity on that event. Additionally, conversion events are uploaded immediately by the SDK in order to make them actionable more quickly. You may add up to 10 events as conversions.
To designate an event as a conversion:
In Firebase, navigate to your app. In Analytics, click Events, then click Network Settings. In the row for the event, click the selector menu action menu (far right of the row), then click Enable conversion.
Once an event has been enabled as a conversion, it is available in ATTRIBUTION → CONVERSION EVENTS. Attribution reporting begins for that event at the time you enable it as a conversion.
To see AdWords-attributed Conversion Events in your attribution reports, import the Firebase Conversion Event to AdWords. Once you have linked your project to AdWords, then those conversion events will also be available in AdWords. You can import them under Tools → Conversions → Firebase.
Note: The VALUE event parameter supplied with conversion events must be a number, and it must be accompanied by a currency code.

iOS - Schedule http request

I am building a travel app which gives complete information about all transportation systems in my city. There is a requirement to notify the user when there is any change in time table of public transport/delay/any incident. To get that information, app has to hit the server at a specified time, say 9am everyday, and if anything is reported, that has to be notified to the user using local notification.
I am aware that this is not a proper design and there are many limitations with respect to Application states to fire the event. But still can iOS app manage such situation(which should work even when app is in background, suspended, inactive, terminated), as I am not getting any support from backend team?
Unfortunately if your backend team is not giving you any support then you are out of luck. Silent push is the only way to do this as per your requirement (exact time every day even if terminated). You could try the background update method, as apparently iOS learns when you're most likely to use a particular app and will schedule the update accordingly.

PlotProjects - using dwelling notifications on iOS

I'm using Plot Projects service to send geofencing notifications to users of iOS and Android application.
I want to use "dwelling" event to trigger specific notifications when user remains at one specific geofence for some extended time. The documentation states that dwelling event can be used on iOS, but has certain specifics:
Please note that due to restrictions in iOS the notification filter for dwelling notifications is called when the user enters the geofence or beacon region and that the returned notifications are only shown when the user remains in the region for the specified amount of time.
By my understanding, this would mean that the Notification filter gets triggered as soon as user enters the geofence, but the notification, if properly filtered, will be displayed after user dwells there. Filtering logic in my case is done on server-side - iOS app sends notification info to server, and then appropriate logic is applied to decide whether to show notification or not.
So, server-side logic for checking whether to show notification or not would be triggered at the time user trips geofence, but the notification would be shown to the user once he dwells there for some time. In my specific case, in order to properly decide whether to show the notification or not, I'd need the check to be done at the time the user really dwells, and not on entering. My understanding is that this cannot be done on iOS (unlike Android).
Am I right to assume this? If not, what would be the way to achieve a dwell-time filtering check, as opposed to enter-time filtering check?
You're correct about the moment when the Notification Filter will trigger on iOS. This is done because of platform limitations. The filter will be called directly when you enter the geofence. When you want filter out messages, that is indeed the time to do so. There is no way to filter at the time of the end of the dwelling period.
This, as mentioned, differs from the behaviour on Android. There it will be called at the end of the dwelling period.

iOS - Push notifications and background threading

I have a service that allows user to enter the type of events they like, and whenever a new event that fits those criteria is available in my database, I want them to get a notification.
I have been looking around at the best way to handle it and I have found two possible solutions, but I'm not very clear with which one I should use and how.
First, a solution that looked great was the didReceiveRemoteNotification method and the usage of remote silent notifications to tell the app that new content was available. But my questions remains: how can I send this remote notification to the user if I don't know which criteria he has. I mean, how can I send this notification using PHP? I'm a bit lost here.
So I found another possible solution that does look a lot like a hack (iPhone - Backgrounding to poll for events), to be able to make your app execute a method every XX minutes while it is in background. This would be way more battery consuming and I'm not even sure it would be accepted by Apple, but at least it is clear as to how it works: the app downloads data from a link with the parameters that fit the special criteria, and if there is new data, it sends a notification.
How could I combine both these methods?
EDIT
I think the main issue on my side is that I don't understand how I could check a certain PHP file whenever new data is added into mysql and make sure that it fits the criteria of the user and then send the notification. That is the part that I don't understand in the backend PHP usage.
Your flow should be like this -
Mobile -> BackendServer(PHP) -> APNS server -> Notifications->Back on device.
User will submit her/his criteria to server then server will process on that and send request to APNS server.
The APNS server will send remote notification on her/his device based on criteria requested.

Capturing iBeacon messages for later use

have a quick question on iBeacons.
Is there a way the user can capture messages they receive when they
are in a particular range to a beacon? Lets say an iBeacon app is being used
in a retail store, the user walks close to a particular beacon and
gets a message prompt and likes it but when he walks away it goes away
and another message appears. Is there a way for the user to capture
which messages they like and look at it later on even when they are
not in the store r within range to a beacon?
Thank you very much
The iBeacon itself doesn't send any messages to the end user. It just makes a three-part numeric identifier available to the app when the iBeacon is visible through the Monitoring or Ranging APIs. Any messaging directly displayed to the user (through a text field or a notification or whatever) always originates from the app itself, in the use case you describe triggered by the iBeacon being detected.
Because the messages always originate from the app and not the iBeacon, you can simply program the app to save off any messaging for later viewing by the end user.
What you want to achieve doesn't seem to be directly related to ibeacons.
It's more about how you will design your app and features. Surely you can save any kind of messages/notifications for posterior use/visualisation. For example you can store them on a server database or locally using iOS user-defaults of your app.
The same thing happens when you receive SMS or email. An app stores them so you can see later, including the time you received and who sent you.

Resources