You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: coupon-on-purchase/README.md
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Send a coupon via FCM when there is a crash
1
+
# Send a coupon via FCM to users who have completed a purchase
2
2
3
-
This sample shows how to send a coupon to your users if a crash has been detected though Firebase analytics.
3
+
This sample shows how to send a coupon to your users who have just purchased something. For instance: 10% off on your next purchase!
4
4
5
5
6
6
## Functions Code
@@ -14,14 +14,13 @@ The dependencies are listed in [functions/package.json](functions/package.json).
14
14
15
15
## Trigger rules
16
16
17
-
The function triggers on changes to `app_exception` Firebase Analytics events. For other automatically logged events see: https://support.google.com/firebase/answer/6317485
17
+
The function triggers on changes to `in_app_purchase` Firebase Analytics events. For other automatically logged events see: https://support.google.com/firebase/answer/6317485
18
18
19
19
20
20
## Deploy and test
21
21
22
22
This sample can be tested on your Android and iOS app. To test it out:
23
23
24
-
- Make sure you set the `app_exception` events as being a **Conversion event** in your project. You can do this on the Analytics section > Events tab.
25
24
- Set the project to your Firebase project using `firebase use --add` then select your projec tin the list.
0 commit comments