Open faiz106 opened 3 days ago
I'm not entirely sure why no data is being displayed in Firebase. However, there is post on StackOverflow indicating that only messages with analytics labels are included in reports. The "Important" section of the official documentation corroborates this. However, the app does not add analytics labels to FCM messages because I do not use analytics in the app, respecting privacy concerns.
To see analytics, you would first need to modify internal/sms-gateway/modules/push/fcm/client.go
to send messages like this:
_, err := c.client.Send(ctx, &messaging.Message{
Data: payload,
Android: &messaging.AndroidConfig{
Priority: "high",
FCMOptions: &messaging.AndroidFCMOptions{
AnalyticsLabel: "message", // Add analytics label here
},
},
Token: address,
})
You might also need to enable Firebase Analytics in the Android part of the project.
However, a more straightforward approach would be to integrate independent analytics into the backend. I am considering Prometheus metrics, which can be viewed in Grafana with graphs. This solution offers greater flexibility.
When I am building the code with docker compose up --build
it gives me this error
failed to solve: process "/bin/sh -c go mod download" did not complete successfully: exit code: 1
Is the docker compose up really using the updated code? It seems it is just downloading a pre built container, etc. Can you please tell me how to rebuild after the above modification?
if we write AnalyticsLabel from capital casing ... then can this cause issue ?
HI
When i sent push notifications using firebase console then i recieved push and also i can see them in reports
but when i send SMS using post api using postman . and send Successful SMS then i don't get any reporting in the dashboard
Hello, @faiz106
Unfortunately, this question isn't directly related to the app; it's more about Firebase. Therefore, I recommend consulting the official Firebase Cloud Messaging (FCM) documentation for more detailed information. Since analytics are not utilized within the app, I'm unable to provide further assistance on this matter. Sorry for any inconvenience.
Hello, @umerHasan . I moved your question to https://github.com/capcom6/sms-gateway/issues/74
I have setup everything successfully and also able to send SMS from postman and in my app i can see messages in logs as well.
Also i have correctly put google-services.json in app folder correctly.
But i am still not getting data in console
![Uploading Screenshot 2024-06-26 at 12.48.11 AM.png…]()