chore: wip reengagement campaign#311
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.Change the |
Android App Size ReportStatus: FAIL
Thresholds: max delta Top artifact bucket deltas (uncompressed bytes):
|
- Added Firestore rules for reengagement events, state, and campaigns. - Enhanced reengagement state tracker to infer sequence from existing state. - Implemented handling of reengagement opens in the app, including updating last login timestamp. - Updated local notification handling to support reengagement payloads. - Introduced new analytics event type for reengagement tracking.
Implementation Complete
Cloud Functions (TypeScript) —
functions/src/reengagementCampaign.ts(new)reengagementCampaigns/{campaignId}Firestore writeslastActiveAtinto hot/warm/cold/frozen bucketscoinTransactionsbefore sendingemailOptOutandpushSuppressedflags per useremailReengagement.ts(new)mailFirestore collection (picked up by Firebase Trigger Email extension)List-Unsubscribeheaders on every email (Gmail/Yahoo compliance)prismwalls.com/reengagement?seq=N&source=email&uid=...which should handle the app-link redirectreengagementStateTracker.ts(new)onReengagementEventCreated: triggered byreengagementEvents/{eventId}(written by the app on deep link tap); recordsseqNOpenedAt, handles unsubscribeonEmailUnsubscribeRequested: triggered byemailUnsubscribeRequests/{requestId}(written by the web unsubscribe page); setsemailOptOuton user docindex.ts— exports 3 new functionsonCampaignNotificationRequested.ts— accepts optionalcampaignId+sequencefields for traceabilityFlutter/Dart —
lib/lib/auth/userModel.dart— addedemailOptOut: boolandpushSuppressed: boolfields (parsed from Firestore, defaulting tofalse).make file-genregenerated the.g.dartfile.lib/features/deep_link/domain/entities/deep_link_action_entity.dart— addedReengagementIntentwithsequence,source,userIdlib/core/router/deep_link_parser.dart— parsesprism://reengagement?seq=N&source=X&uid=Ylib/core/router/deep_link_navigation.dart— mapsReengagementIntent→AiTabRouteand writes areengagementEventsdoc for server-side state trackinglib/notifications/localNotification.dart— handlesreengagementpayload on cold-start notification tap; navigates to AI tab and records the open eventWhat still needs to be done before launch
mailcollection to SendGrid/Mailgunnoreply@prismwalls.comas a verified sender domainprismwalls.com/unsubscribe?token=...&uid=...— validates token, writes toemailUnsubscribeRequestsprismwalls.com/reengagement?seq=N&source=email&uid=...— handles app-link redirect toprism://reengagementfirebase deploy --only functions{ sequence: 1, segments: ["hot","warm","cold","frozen"] }toreengagementCampaignscollection