Streaks
Streaks inspire repeat visits and brand loyalty by challenging users to meet activity targets over consecutive time periods. When users hit milestones along the way, rewards are automatically issued.
Customizable streak durations, milestone configurations, and engaging end-user displays make streaks one of the most powerful engagement tools in Gamopanda.
How it works
- Create a streak — define a name, aggregation method, aggregation period, aggregation target value per period, and an overall completion target.
- Attach milestones — link
Milestonerecords to the streak. Each milestone fires a reward when the user reaches that progress threshold. - Log activity — send
Streak Logentries as users perform qualifying actions. The platform aggregates logs per period automatically. - Track progress —
Streak Progressrecords are maintained per user, tracking their current value, status, and timestamps. - Earn rewards — when a milestone is hit, a
Reward Logentry is created with a coupon code for the user.
Fields
Basic information
| Field | Type | Required | Max length | Description |
|---|---|---|---|---|
name | string | ✅ | 256 | The name of the streak |
description | string | ✅ | 1 024 | A brief description of the streak |
status | enum | ✅ | — | draft · live · paused |
completionTargetValue | integer | ✅ | — | Total number of periods the user must complete to finish the streak |
Aggregation settings
Aggregation controls how the platform measures per-period progress from incoming Streak Log entries.
| Field | Type | Required | Default | Options | Description |
|---|---|---|---|---|---|
aggregationMethod | enum | ✅ | sum | sum · count | How log values are combined within a period — sum adds activityValue, count counts the number of log entries |
aggregationPeriod | enum | ✅ | daily | daily · weekly · monthly | The time window over which progress is measured |
aggregationTargetValue | number | ✅ | — | — | The value a user must reach within a single period to count that period as complete |
Real-world examples
🛍️ E-commerce — "7-Day Shopper" streak
Reward customers who spend $50 every day for 7 consecutive days. Milestone at day 3 gives 5% off; milestone at day 7 gives free shipping for a month.
Code
☕ Food & Beverage — "Weekly Regular" streak
Reward café customers who make at least 2 purchases every week for 4 consecutive weeks. Each week counts as one completed period.
Code
aggregationMethod: count— eachStreak Logentry counts as 1 visit regardless of itsactivityValue.
🏋️ Fitness app — "Monthly Mover" streak
Reward users who log at least 1 500 activity minutes every month for 3 months. Milestone at month 1 gives a discount on premium; completing all 3 months gives free membership.
Code
📚 EdTech — "Daily Learner" streak
Reward students who complete at least 1 lesson per day for 30 consecutive days.
Code
Milestones at day 7, 14, and 30 progressively unlock course discounts.
Milestones
| Field | Type | Description |
|---|---|---|
milestones | Milestone[] | Read-only. Milestones linked to this streak via the Milestone module. Manage them from the Milestones tab. |
End-user display (EUD)
All EUD fields are localisable — supply a languageCode query parameter when reading to receive the translated value.
Labels
| Field | Default | Max length | Description |
|---|---|---|---|
eudTitle | — | 48 | Title shown to the end user |
eudDescription | — | 1 024 | Description shown to the end user |
eudIcon | (default streak icon) | — | Icon image. Allowed: PNG, JPEG, JPG, GIF, SVG · Max size: 100 KB |
eudInProgressLabel | In Progress | 32 | Status label while streak is active |
eudCompletedLabel | Completed | 32 | Status label when streak is finished |
eudNotStartedLabel | Not Started | 32 | Status label before any activity |
eudBrokenLabel | Broken | 32 | Status label when streak is broken |
eudViewDetailsButtonText | View Details | 32 | CTA button label |
Messages
Messages support template variables that are resolved at runtime. Available variables:
| Variable | Description | Example value |
|---|---|---|
{{periodText}} | Human-readable period name derived from aggregationPeriod | daily → day · weekly → week · monthly → month |
{{currentProgressValue}} | Number of periods the user has successfully completed so far | 3 (user has completed 3 out of 7 days) |
{{nextProgressValue}} | The next period number the user is working toward | 4 (user is working toward their 4th day) |
{{nextRemainingValue}} | Amount still needed in the current period to mark it complete | 20.50 (user has spent $29.50, needs $50 total → $20.50 remaining) |
{{nextRemainingPeriod}} | Number of future periods still needed to reach the next milestone | 2 (milestone requires 5 periods, user has 3 → 2 more to go) |
Rendered example — for a daily spend streak where the user is on day 3, has spent $29.50 today, and the next milestone is at day 5:
| Variable | Resolved value |
|---|---|
{{periodText}} | day |
{{currentProgressValue}} | 3 |
{{nextProgressValue}} | 4 |
{{nextRemainingValue}} | 20.50 |
{{nextRemainingPeriod}} | 2 |
So the default eudNonMilestoneNextToBeAchievedMessage would render as:
Shop for $20.50 or more to complete the day 4 streak!
And eudMilestoneNextToBeAchievedMessage would render as:
Shop for $20.50 or more for 2 days to complete the next milestone!
| Field | Default | Max length |
|---|---|---|
eudNonMilestoneNextToBeAchievedMessage | Shop for ${{nextRemainingValue}} or more to complete the {{periodText}} {{nextProgressValue}} streak! | 256 |
eudNonMilestoneAchievedMessage | You have completed {{periodText}} {{currentProgressValue}} streak! Come back next {{periodText}} to shop more to maintain your streak and reach the next milestone! | 256 |
eudCompletedStreakMessage | Congratulations! You have completed this streak! Come back next {{periodText}} to shop more and start your next streak! | 256 |
eudBrokenStreakMessage | Your streak has been broken. Don't worry, you can start a new streak today! Shop more and reach your next milestone! | 256 |
eudMilestoneNextToBeAchievedMessage | Shop for ${{nextRemainingValue}} or more for {{nextRemainingPeriod}} {{periodText}}s to complete the next milestone! | 256 |
eudMilestoneAchievedMessage | You have completed {{periodText}} {{currentProgressValue}} streak! Come back next {{periodText}} to shop more to maintain your streak and reach the next milestone! | 256 |
Access & permissions
| Caller | Allowed operations |
|---|---|
| Admin | CREATE · GET · LIST · UPDATE · DELETE |
| End user | GET · LIST |
| Guest (unauthenticated) | GET · LIST |
Related resources
A streak is the parent record that ties together several sub-resources:
| Resource | Description |
|---|---|
| Milestone | Reward checkpoints attached to a streak |
| Streak Log | Individual activity events logged against a streak |
| Streak Progress | Per-user progress state for a streak |
| Reward Log | Rewards issued when a milestone is reached |
API reference
See the API Reference for full request/response schemas and interactive examples for:
GET /schema/streak/record— list streaksPOST /schema/streak/record— create a streakGET /schema/streak/record/{id}— get a streak by IDPATCH /schema/streak/record/{id}— update a streakDELETE /schema/streak/record/{id}— delete a streak