Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/features/streaks/days_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/features/streaks/freeze_accumulation.mp4
Binary file not shown.
Binary file added assets/features/streaks/freeze_grants.mp4
Binary file not shown.
152 changes: 90 additions & 62 deletions es/features/streaks.mdx

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions es/features/users.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Asigna un nombre y una clave única al atributo. La clave es lo que utilizarás

### Configuración de atributos {#setting-attributes}

Los atributos pueden recibir valores para usuarios específicos utilizando su clave única, ya sea de forma integrada, cuando los usuarios incrementan métricas a través de la [API de incremento de métricas](/es/api-reference/endpoints/events/submit-a-metric-event), o explícitamente mediante las APIs de [identificación de usuario](/es/api-reference/endpoints/users/identify-a-user), [creación de usuario](/es/api-reference/endpoints/users/create-a-user) o [actualización de usuario](/es/api-reference/endpoints/users/update-a-user).
Los atributos pueden asignarse valores para usuarios específicos utilizando su clave única, ya sea en línea, a medida que los usuarios incrementan métricas a través del [API de incremento de métricas](/es/api-reference/endpoints/events/submit-a-metric-event), o explícitamente mediante las APIs de [identificación de usuario](/es/api-reference/endpoints/users/identify-a-user), [crear usuario](/es/api-reference/endpoints/users/create-a-user) o [actualizar usuario](/es/api-reference/endpoints/users/update-a-user).

<Warning>
Trophy solo establecerá valores de atributos que hayan sido creados previamente
Expand Down Expand Up @@ -227,7 +227,7 @@ Cuando le informas a Trophy sobre un usuario en tu plataforma, llamamos a esto *

La identificación en línea es la forma más sencilla de informar a Trophy sobre tus usuarios, ya que no requiere ningún código específico de identificación de usuarios. Simplemente le informas a Trophy sobre los usuarios a medida que utilizan normalmente tu plataforma.

En la práctica, esto significa que cada vez que utilizas la [API de Eventos de Métricas](/es/api-reference/endpoints/events/submit-a-metric-event), proporcionas los detalles completos del usuario que desencadenó el evento.
En la práctica, esto significa que cada vez que utilices el [API de Eventos de Métrica](/es/api-reference/endpoints/events/submit-a-metric-event), debes pasar los detalles completos del usuario que desencadenó el evento.

Aquí hay un ejemplo donde se realiza una llamada a la API de eventos de métricas, y los detalles del usuario que realizó la interacción se incluyen en el cuerpo de la solicitud:

Expand Down Expand Up @@ -367,17 +367,18 @@ Una vez que hayas obtenido y mostrado las preferencias, los usuarios pueden real

### Preferencias de Racha {#streak-preferences}

Trophy permite configurar las preferencias de racha de los usuarios, lo que les permite personalizar las condiciones que deben cumplir para extender su racha.
Trophy admite preferencias de usuario para rachas, permitiendo a los usuarios personalizar las condiciones que deben cumplir para extender su racha, incluyendo qué días de la semana cuentan para ella.

<Note>
Para usar las preferencias de racha, debes tener la [personalización de rachas](/es/features/streaks#streak-personalization) habilitada.
</Note>

Una vez habilitada la personalización de rachas, la [API de actualización de preferencias](/es/api-reference/endpoints/users/update-user-preferences) te permitirá sobrescribir la configuración predeterminada de rachas para un usuario específico.

Las siguientes configuraciones de racha pueden ser sobrescritas por las preferencias del usuario:
Las siguientes configuraciones de racha pueden ser anuladas por las preferencias de usuario:
- `metrics`: Un array de [métricas](/es/features/metrics) con umbrales personalizados requeridos para extender la racha.
- `evaluationMode`: Determina cómo se combinan las métricas para extender la racha. Puede ser `ALL` o `OR`.
- `metrics`: Un array de métricas con umbrales personalizados requeridos para extender la racha.
- `daysOff`: Un array de números de días de la semana (`0` = domingo hasta `6` = sábado) que anulan los [días libres](/es/features/streaks#days-off) de la organización. El usuario no perderá su racha si está inactivo en estos días.

<UserStreakPreferencesResponseBlock />

Expand Down
81 changes: 54 additions & 27 deletions features/streaks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,49 +37,82 @@ You can choose which metrics should be part of your streak, and for those that y
/>
</Frame>

When combining metrics in this way, you can choose between two evaluation modes:
When combining metrics, you can choose between two evaluation modes:
- `ALL` means a user must meet every metric threshold to extend their streak
- `OR` means a user only has to meet one of your metric thresholds to extend their streak

In this way you can design your streak logic to match your application use case.

## Streak Freezes {#streak-freezes}
### Days Off {#days-off}

Streak freezes help users keep their streaks for longer by allowing them to miss periods without it resetting to zero. This helps keep streaks motivating even if users don't maintain a perfect usage habit.
For daily streaks, you can mark specific days of the week as days off on the [streaks page](https://app.trophy.so/streaks) of the Trophy dashboard. Those days do not count toward the streak: users can still extend their streak if they are active, but missing a day off will not break it.

<Frame>
<img
height="200"
width="100%"
noZoom
src="../assets/features/streaks/freezes_config.png"
src="../assets/features/streaks/days_off.png"
/>
</Frame>

Streak freezes are optional in Trophy but can be configured on the [streaks page](https://app.trophy.so/streaks) of the Trophy dashboard.
You must leave at least one day that counts toward the streak. Weekly and monthly streaks ignore days off.

### Granting Initial Freezes {#granting-initial-freezes}
Unlike [streak freezes](#streak-freezes), days off are not consumed. They apply every week until you change them.

You can configure any number of arbitrary freezes to grant to new users when you first identify them with Trophy.
If you've enabled [streak personalization](#streak-personalization), users can override the default days off through [user preferences](/features/users#streak-preferences).

<Tip>
Giving users too many freezes may decrease their perceived value, but granting too few freezes might result it a higher number of lost streaks. A good starting point is one freeze per user, but the trick is to experiment!
</Tip>
## Streak Freezes {#streak-freezes}
Comment thread
cbrinicombe13 marked this conversation as resolved.

Streak freezes help users keep their streaks for longer by allowing them to miss a set number of periods without it resetting to zero. This helps keep streaks motivating even if users don't maintain a perfect usage habit.

### Freeze Accumulation {#freeze-accumulation}
Streak freezes are optional and can be configured on the [streaks page](https://app.trophy.so/streaks) of the Trophy dashboard.

As users use up streak freezes, they'll need a continuous supply of new ones to keep them going. To facilitate this, Trophy can automatically grant streak freezes to users over time. You can choose an arbitrary number of days over which to grant an arbitrary number of freezes to each user.
When enabled, you decide how many freezes a user can have, and how many are granted to them over time. When a user misses a period, one freeze is consumed. Freezes are consumed until users have no freezes left, at which point the user's streak is reset to zero.

If you've [configured time zones](/features/users#param-tz) for your users, Trophy will automatically consume freezes at midnight in the user's time zone when necessary to extend their streak, and if any new freezes are due to be granted to a user, they will be granted up to ten minutes later.
<Note>
Streak freezes are different from [streak pauses](#streak-pauses) in that freezes allow users to miss a set number of periods without breaking their streak, regardless of the reason, while streak pauses specifically protect a streak over a known and pre-defined date range, such as a scheduled vacation or break. Freezes are consumed automatically when the user misses a required activity, whereas pauses are manually created in advance to cover planned absences.
</Note>

### Granting Freezes {#granting-freezes}

You can configure any number of arbitrary freezes to grant to new users when you first identify them with Trophy. To set this up, enable freeze grants and set the starting freeze count on the streaks page of the Trophy dashboard.

<Frame>
<video
autoPlay
muted
loop
playsInline
className="w-full aspect-15/4"
src="../assets/features/streaks/freeze_grants.mp4"
></video>
</Frame>

### Maximum Freeze Count {#maximum-freeze-count}
Trophy can also automatically grant streak freezes to users over time. You can choose an arbitrary number of days over which to grant an arbitrary number of freezes to each user.

In Trophy you also configure the maximum number of freezes that each user can have, up to a limit of 100. [Freeze accumulation](#freeze-accumulation) will only ever grant freezes up to this limit.
To set this up, set the number of days over which to grant freezes and the number of freezes to grant on the streaks page of the Trophy dashboard. Here you can also set the maximum number of freezes that each user can have, up to a limit of 100.

<Frame>
<video
autoPlay
muted
loop
playsInline
className="w-full aspect-15/4"
src="../assets/features/streaks/freeze_accumulation.mp4"
></video>
</Frame>

If you've configured time zones for your users, Trophy will automatically consume freezes at midnight in the user's time zone when necessary to extend their streak, and if any new freezes are due to be granted to a user, they will be granted up to ten minutes later.
## Streak Pauses {#streak-pauses}

Streak pauses protect a user's streak over a known date range, such as a vacation or other planned break. While a pause covers a period, Trophy maintains the user's streak length instead of ending the streak if they miss their [streak conditions](#streak-conditions).

<Note>
Streak pauses are different from [streak freezes](#streak-freezes) in that pauses specifically protect a user's streak over a known and pre-defined date range, such as a scheduled vacation or break, while freezes allow users to miss a set number of days (or periods) without breaking their streak, regardless of the reason. Pauses are manually created in advance to cover planned absences, whereas freezes are consumed automatically when the user misses a required activity.
</Note>

### Creating Pauses {#creating-pauses}

Create pauses with the [create streak pauses admin API](/admin-api/endpoints/streaks/create-pauses). You can create pauses for up to 100 users in a single request.
Expand Down Expand Up @@ -114,9 +147,13 @@ For a full walk through on how to set up a streak feature using Trophy, check ou

## Streak Personalization {#streak-personalization}

Trophy can support users personalizing how their streak works within guardrails you set for them.
Trophy can support users personalizing how their streak works within guardrails you set for them. To do this, turn on streak personalization in the [streaks page](https://app.trophy.so/streaks) of the Trophy dashboard.

To do this, turn on streak personalization in the [streaks page](https://app.trophy.so/streaks) of the Trophy dashboard.
Once enabled, users will be able to customize the [streak conditions](#streak-conditions) that they must meet to extend their streak, including streak evaluation mode, the threshold for each metric, and [days off](#days-off), through user preferences.

<Tip>
To learn more about how to set user preferences for a specific user, read the dedicated documentation on [user preferences](/features/users#streak-preferences).
</Tip>

<Frame>
<video
Expand All @@ -132,20 +169,10 @@ To do this, turn on streak personalization in the [streaks page](https://app.tro
/>
</Frame>

Once enabled, users will be able to customize the [streak conditions](#streak-conditions) that they must meet to extend their streak, including streak evaluation mode and the threshold for each metric, through user preferences.

<Tip>
To learn more about how to set user preferences for a specific user, read the dedicated documentation on [user preferences](/features/users#streak-preferences).
</Tip>

## Managing Streaks {#managing-streaks}

This section outlines some of the operations you can perform to manage user's streaks in your application.

### Pausing A User's Streak {#pausing-a-users-streak}

To pause a user's streak for a specific date range, use the [create streak pauses admin API](/admin-api/endpoints/streaks/create-pauses). See [streak pauses](#streak-pauses) for how pauses work, including how to delete them.

### Restoring A User's Streak {#restoring-a-users-streak}

To restore a user's streak, head to the user details page and use the 'Restore Streak' action. Restoring a user's streak sets it to the length it was when they last lost it.
Expand Down
5 changes: 3 additions & 2 deletions features/users.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ Once you've fetched and displayed the preferences, users can make changes in you

### Streak Preferences {#streak-preferences}

Trophy supports user preferences for streaks, allowing users to customize the conditions they must meet to extend their streak.
Trophy supports user preferences for streaks, allowing users to customize the conditions they must meet to extend their streak, including which days of the week count toward it.

<Note>
In order to use streak preferences, you must have [streak personalization](/features/streaks#streak-personalization) enabled.
Expand All @@ -378,8 +378,9 @@ In order to use streak preferences, you must have [streak personalization](/feat
Once streak personalization is enabled, the [update preferences API](/api-reference/endpoints/users/update-user-preferences) will allow you to override default streak settings for a specific user.

The following streak settings can be overridden by user preferences:
- `metrics`: An array of [metrics](/features/metrics) with custom thresholds required to extend the streak.
- `evaluationMode`: Determines how metrics combine to extend the streak. Can be `ALL` or `OR`.
- `metrics`: An array of metrics with custom thresholds required to extend the streak.
- `daysOff`: An array of weekday numbers (`0` = Sunday through `6` = Saturday) that override the organization [days off](/features/streaks#days-off). The user will not lose their streak if they are inactive on these days.

<UserStreakPreferencesResponseBlock />

Expand Down
Loading
Loading