Interference between Branch WebSDK and link tracking? - branch.io

We are currently using Branch IO for our attribution of app installations. However, we have seen some troubling elements regarding tracking - specifically, that link context is lost in some flows. This seems to have started when we integrated the Web SDK.
The flow is as follows:
From within our iOS application (that has Branch integrated), I initiate an SMS to be sent to myself (a branch link with some referral parameters including campaign)
After the SMS is sent, I delete the application from my phone.
I reset my Advertiser ID on my phone and clear my browser cookies
I click the link in my SMS messages (and this initiates tracking event in Branch Dashboard). The link eventually drops me onto a page that I control, which ALSO has the Branch WebSDK installed. This fires page events.
I then click the button on the page that takes me to the app store, install the application, and then fire it up.
I see in the dashboard that an install event has occurred, but it does NOT associate it with the initial campaign from the SMS.
Is this expected? My current theory is that the WebSDK fires a new event, which now is tracked by Branch as the latest event and since the WebSDK doesn't have any of the tracking parameters from the SMS campaign, it gets lost.
I have tried to debug this but once it goes into Branch, I'm not sure how to tell where things are lost. Any tips would be greatly appreciated!

Related

React Native notification/alert

In react native app
I want to implement a feature in which any employee whenever completes a certain task then reporting person should get notified
eg. Site visit, the employee checked in the app, etc.
So please guide me
How to implement this feature and which package should I use?
What I found till now
FCM
react-native-notifications
react-native-in-app-notification
As you are using a real-time database, write a listener which dispatches an event with some payload data every time an employee accomplishes a task.
In this context, any local notification package can push local a notification for each event dispatched.
I recommend https://notifee.app/ for Local notification, It has easy API and more notification-related features.
In case you favor cloud over local notification. You should review https://docs.wonderpush.com/docs/mobile-push-notifications-react-native. They have an easier-to-use API for pushing and receiving notifications.

Are there any info or links that clearly covers paypal integration in react native?

I would like to setup a paypal payment method exactly the same as Airbnb. The payment will be recurring on a monthly basis.
If one user is directly paying another user for a fixed amount that recurs automatically every month between just their accounts (very different from AirBnB's setup), that can be done with a Subscribe button. The easiest integration will be to create a classic HTML-only Subscribe button via https://www.paypal.com/buttons , uncheck the option in Step 2 to save the button at PayPal, and once the code is generated click the link to remove code protection. This will give you a button with variables you can adjust, per HTML Variable for Payments Standard, including the business destination in particular.
Newer PayPal Subscriptions can be used instead, but are more complex to set up, as each user will need to have the appropriate recurring Plan created for them via an API call, and you will need their Client ID and Secret to do that from your server.
Since you are using React Native, it is important to note that all PayPal flows require a web interface that includes an address bar, such as Safari View Controller or Chrome Custom Tab. A WKWebView or similar cannot be used.

Strategy for notification checking

Is there a recommended strategy for checking of notifications within my AngularJS app?
By 'notification' I'm talking about message alerts that are to be displayed to a user when they're logged into the application.
My plan is to notify the user of unread notifications in the app's NavBar as shown below:
My app communicates with my restFul API (written using Node.js, express, MongoDB), so I anticipate that new notification will be written to a MongoDB collection with details the user the notification is intended for.
What I'm unsure about is how the AngularJS application will check for notifications once a user is logged on. I could call my API for unread notifications every time the user navigates from one path to another but that seems simplistic and it wouldn't work if a new notification occurs whilst a user is viewing a page.
Another way would be some sort of timer system that checked, say, every 30 seconds. But this would results in unnecessary polling of my API when there aren't any new notification for a user.
So, wondering if there is a recommended strategy. Thanks for your help.
Polling is a solution but it is very inefficient. The solution to your problem are websockets. Websockets is a technology that provides a full-duplex bidirectional communication between your clients and your server. So you can send messages from your server to your connected clients. Your server maintains an array of connected clients and you just have to know which ID you need to send a message to it.
For your stack, the best solution I have came to is Socket.io http://socket.io
It also have cool features. For example, you can "observe" models, so if a model change in your database, for example an update to a user profile is made, you can trigger an event and automagically send a message to your client. This client get and handles the notification and do something, like put a badge on your alerts icon.
Hope this is useful for you.

Unregister tags with Azure Service Bus Notification Hubs

I have inherited an iOS app that uses Azure Notification hubs to send notifications, however there is a snag.
The users select multiple categories for which to receive notifications (News, Sports, etc), and they can change these at any time. Whenever they add or delete an interest the app unregisters from the notification hub and subscribes with the new tags.
I thought that this was incorrect, but I can't find a way to see what tags a user is subscribed to, or add/delete a single tag.
In the current app, sometimes our test devices don't receive notifications that I think they should.
I've found answers online saying that you should avoid unregistering, and that there is a delay to register and unregister (such as the answer here, Android Azure Notification hub unregister)
I am looking for any insight on how to handle this usecase, of adding and deleting tags.
Since you didn't specify how you are communicating with the Azure Notification Hub, I will use the ANH REST API as reference.
"...I can't find a way to see what tags a user is subscribed to..."
If you request a registration (e.g. per registration ID), you will get the registration data including the assigned tags.
"...or add/delete a single tag."
You don't add or delete single tags directly on the registration in ANH, you basically update the whole registration, if necessary. Some ANH SDKs may have convenience methods for this, but in general, you just send the complete registration object with the desired tags to ANH and it gets overwritten. E.g. the REST API has an "Update Registration" method, but no "Add/Remove Tag" methods.
"I've found answers online saying that you should avoid unregistering, and that there is a delay to register and unregister..."
You should indeed not unregister and register for this use case because of the reasons you stated. This is probably also the reason for:
"In the current app, sometimes our test devices don't receive notifications that I think they should."
Never unregister and register again for updating a registration. Only unregister, if you don't want to receive notifications at all on a specific device.
"I am looking for any insight on how to handle this usecase, of adding and deleting tags."
Basically, just omit the "unregister step" and make the "register step" a "create or update registration step" using the actual ANH registration ID and all desired tags.

send notification to a particular user with notification hub - Azure and GCM

I am a software developer in Xamarin - Android, I want to create notification messages. For this purpose I use Azure notification hub, combined with Google's service - Google Cloud Messaging (GCM).
My problem comes when I want to send notification to a particular user. I realized that I need to use the "TAGS" When I compose a new user to the system (Uniqe TAG)
Indeed, it works great, but when the user logged off his account, and then connect to another one (with another TAGS) - the TAGS of his old account are kept in a certain time, and he continues to receive personal messages from the previous account!!!!
Does anyone know what can be done about it?
thank you very much
This is actually an issue a lot of people/apps have on iOS and Android.
What you should do is:
Register your app at your Azure Notification Hub (ANH) on first start and reregister at every app start, to keep registration in sync
If a user logs in, update the registration with an additional tag for this user (e.g. "user:XY")
Sending notifications to that user tag will of course result in notifications on all devices the user is logged in on
If a user logs out, update the registration without the user tag (omit the user tag, so the registration doesn't have user tag anymore afterwards)
The registration will be updated immediately on ANH and sending notifications to the user (tag) will not result in notifications on that specific client
If the user can logout on your app without internet connection, you won't be able to update the registration of course and you will still have the problem of getting notifications for a logged out user. But as soon as another user logs in, the registration should get updated with the new user tag and everything should be fine again...
What you shouldn't do:
"Developers should never unregister the client app as a mechanism for logout or for switching between users..."