Hash
Hash

Reputation: 157

How to get notified when a new user signed up with our app?

Can anyone tell me how can I get notifications with their mail Id and name on my app when a new user signed up with my app?

For example I am the developer of an app on which users will sign up, and I will make an app for myself to get notified when and how many users signed up with my production app I am using Firebase for authentication, can anyone give me some ideas on this?

Upvotes: 2

Views: 3201

Answers (3)

hya
hya

Reputation: 1738

You can use service like Logspot. No need to setup anything in your side.

  1. Start tracking sign-ups on the client side with Web SDK:

    import Logspot from "@logspot/web";

    Logspot.init({ publicKey: "YOUR_PUBLIC_KEY" });

    Logspot.track({ event: "User signed up", metadata: { email: "[email protected]" } });

  2. Install their mobile app and login.

  3. Receive mobile notification on each sign up

More info in the docs.

Upvotes: 0

Peter Haddad
Peter Haddad

Reputation: 80924

Yes, this can be done using cloud functions. That way you do not need to use your own server or create an API call for your backend, which will lead to making your work easier.

From the docs:

Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests. Your code is stored in Google's cloud and runs in a managed environment. There's no need to manage and scale your own servers.

check this link: https://firebase.google.com/docs/functions/

You can add the user to the database and then using cloud functions a database trigger will get triggered everytime a new user is added and you will get notified, or you can use the authentication to get notified when a user creates or deletes an account.

For more info: https://firebase.google.com/docs/functions/auth-events

Also this: https://firebase.google.com/docs/functions/database-events

Upvotes: 7

Subhasmith Thapa
Subhasmith Thapa

Reputation: 894

You can make an API call to your backend wherein you can capture all the data required(In your case email_id and Name) by the backend after the user sign in. And the same data can be used by your backend to send notifications to you. You can look at FCM for sending the Push Notifications. Please let me know if I made myself clear.

Upvotes: 1

Related Questions