Skip to main content
All CollectionsWorking with nGrow
[Firebase] Building audiences based on ngrow callbacks
[Firebase] Building audiences based on ngrow callbacks
M
Written by Marat Zhanabekov
Updated over a year ago

Overview

When ngrow.ai sends a push notification, it might send a server-side event (a callback) back to your analytics system. Ask your manager to set up callbacks if needed.

For instance, if your analytics system is Firebase, ngrow.ai can send events using Measurement Protocol, so you can see which users received what, right in Firebase.

Callbacks are sent for every push notification sent. The structure of the callback event is following:

{
"name": "ngrow_push_sent", # is fixed and unchangeable
"params": {
"holdout": holdout, # true if the user is in a control group (received silent push notification), false otherwise
"push_id": push_id, # id of the segment of the push notification
"hypo_id": hypo_id, # id of the message of the push notification
"title": title, # title of the push notification
"body": body, # body of the push notification
"locale": locale # locale of the push notification
}
}

Setup

To set up the audience building based on ngrow’s callback events in Firebase, you need to complete the following steps:

  1. Ask your ngrow manager to start sending push notification callbacks.

  2. Go to the Firebase Console, and choose a project you want to work with. In the left menu, than choose Analytics → Custom Definitions, and press the Create custom dimension button

  3. In the appearing window, fill all the fields:

    Dimension name: any descriptive name of the dimension (same as event parameter is recommended)

    Scope: Event

    Description: (optional) description of the dimension

    Event parameter: holdout

  4. Repeat the previous step for the following Event parameters: holdout, push_id, hypo_id. Optionally, you might also do that for the title, body, and locale.

🚨 Custom dimensions calculation works on a daily basis and does not apply retrospectively in Firebase. So, to build audiences, you need to wait at least a day for changes to take place.

Building an audience

Once you’ve set up Custom dimensions and waited a day for changes to take place, we might go to the audience-building step.

Here is an example of how to build an audience that received non-silent push notifications from ngrow at least once in the last 30 days:

  1. Go to the Analytics → Audiences and hit the New audience button:

  2. In the appeared window, hit the Create a custom audience button

  3. Name your audience and press Add new condition drop-down button:

  4. In the appeared window, press Events and find the ngrow_push_sent event:

  5. After that, press the Add parameter button

  6. And choose Custom → holdout

  7. in the appeared window, choose Condition as exactly matches, and Value as false:

This is it!

Did this answer your question?