💡 nGrow.ai is a no-SDK solution, so the integration part is easy-peasy. But we’ll need a little bit of your app developer’s attention to do things in this guide (about 30 mins). That’s it.
Goals
The goal of this guide is to set up:
basic push notifications handling via Firebase Cloud Messaging SDK
set up a callback for sending
registration_id
(same as push token in Firebase Cloud Messaging system) to Firebase Analytics as an event with event property
Prerequisites
It is expected that you’ve already implemented:
Firebase Android Core SDK. It is probably already implemented. If not, refer to the link and stick to Option 1 inside.
💡 Sometimes there are problems on android that the icon is not displayed. This guide will help you troubleshoot these issues.
Sending registration_id as an event property
⚠️ This is an important mandatory part
Implement logging the custom event
push_token
with custom event properties. If you don't know, how to send custom events, please refer to this instruction.There is a bit tricky part with sending push tokens (
registration id
in Firebase). The thing is that there is a limit of 100 characters for any string event property, but the registration id length is ~163 chars. So we suggest splitting the registration id into two strings of 100 chars and the rest respectively, and sending them in two event propertiespush_token_0
andpush_token_1
within the same event.So the final setup of the event would be:
event_name: push_token
event_properties:
push_token_0: “fVB5-GsfONYTmjsOX6POeS:APA91bGOokpBTI_aAO_JybIMfJ8WCPX_77EWVqzOlmsTm6GaUngqRf-hu_ZMXS9JptSOqBJ0YxOG”,
push_token_1: “IhnUwZAetYELraJkvzGOJxQCksefcJLsg_1zPi7LYKWqfQ35qLc2CNwb6TFddGv9”
We strongly recommend logging the push_token event on EVERY app start. To retrieve the current token, you need to call
FirebaseMessaging.getInstance().getToken()
method.Make sure that you have linked Firebase and BigQuery according to this instruction.