CustomerGlu sends notification as firebase data messages in the following formats
Using webview
If you would like to use the layouts from CG, you can extract the nudge url from data messages and load it in a webview
{
name: 'CustomerGlu',
data: {
"type": "CustomerGlu",
"glu_message_type":"in-app",
"title": "Attended live class X time(s)",
"body": "You are doing great! Just x more times to go and win your reward",
"image": "",
"nudge_url": "https://staging.d283eczxp8leqk.amplifyapp.com/program-nudge/streak-progress/?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyMzk3OTMiLCJjbGllbnQiOiI0ZjdmNjE5OC0yNGNmLTRkZDYtODcxOS04MjdkM2RlNzYwNGYiLCJpYXQiOjE2MTcwMTU3MDEsImV4cCI6MTY0ODU1MTcwMX0.sAoqC8TGw3SSFl3W7PvJJilLivD7tL3Y-n23iBWHXAU&campaignId=44941f5f-a84f-46c0-9901-6e80e445a257"
}
}
Fullscreen nudge
Using Native In-app Layouts
If In-app layout already exists in the app, You can build the in-app notifications using he data messages we send. sample below
CustomerGlu Notification Object
Handling CustomerGlu Notifications
To handle the notifications configured via CustomerGlu Dashboard (Push/In-app), use the given method:
Configure Notification Type -
Function Parameter:
fcmApn- It accepts string "fcm" or "apn" depending on the notfication service being used by the app.
Set FCM/APNS Token -
Add following code in didFinishLaunchingWithOptions()