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
15 changes: 0 additions & 15 deletions .github/workflows/check-link-rot.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Top level styles
StylesPath = styles
MinAlertLevel = suggestion
IgnoredScopes = code, tt, img, url, a, em, strong, code
SkippedScopes = script, style, pre, figure, code

# Vocabularies
Vocab = Mintlify, Trophy

# This is required since Vale doesn't officially support MDX
[formats]
mdx = md

# MDX support
[*.mdx]
BasedOnStyles = Vale
Vale.Terms = NO # Enforces really harsh capitalization rules, keep off

# `import ...`, `export ...`
# `<Component ... />`
# `<Component>...</Component>`
# `{ ... }`
TokenIgnores = (?sm)((?:import|export) .+?$), \
(?<!`)(<\w+ ?.+ ?\/>)(?!`), \
(<[A-Z]\w+>.+?<\/[A-Z]\w+>)

# Exclude:
# `<Component \n ... />`
BlockIgnores = (?sm)^(<\w+\n .*\s\/>)$, \
(?sm)^({.+.*})

CommentDelimiters = {/*, */}
4 changes: 2 additions & 2 deletions account/billing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Trophy defines an MAU as a single user that is involved in at least one API call

## Free tier

All customers start on the free tier. This allows dev teams to build and test implementations for up to **100 MAUs** without accurring any usage charges.
All customers start on the free tier. This allows dev teams to build and test implementations for up to **100 MAUs** without accruing any usage charges.

<Note>
If you exceed the free plan, don't panic! Nothing will stop working, we'll
Expand Down Expand Up @@ -62,7 +62,7 @@ You can view your usage for the current billing period in the [Trophy dashboard]

<AccordionGroup>
<Accordion title="When will I be charged?">
We charge all customers on the 1st of the month in arreas.
We charge all customers on the 1st of the month in arrears.
</Accordion>
</AccordionGroup>

Expand Down
2 changes: 1 addition & 1 deletion account/branding.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Branding
description: Configure your logo and brand colors used across features built with Trophy.
"og:description": Learn how Trophy tracks usage according to the number of usres that use your product.
"og:description": Learn how Trophy tracks usage according to the number of users that use your product.
icon: palette
---

Expand Down
4 changes: 2 additions & 2 deletions api-reference/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Trophy keeps track of and displays when each API key in your account was created

### Anatomy of an API key

Each API key is made up of 2 parts seperated by a period:
Each API key is made up of 2 parts separated by a period:

```bash
{prefix}•{body}
Expand Down Expand Up @@ -64,7 +64,7 @@ API keys can be rotated if you want to change them for any reason. At the point

### Revoking keys

API keys can also be revoked entirely at which point they become _Inactive_. At the point of revokation, the API key will no longer function and any requests still using it will begin receiving `401` responses immediately.
API keys can also be revoked entirely at which point they become _Inactive_. At the point of revocation, the API key will no longer function and any requests still using it will begin receiving `401` responses immediately.

Once revoked you can re-activate the API key at any time.

Expand Down
10 changes: 7 additions & 3 deletions api-reference/idempotency.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ When Trophy detects an idempotency key has been sent with an event, it will firs
<Note>
All Trophy [metrics](/platform/metrics) manage idempotency in isolation.
Trophy will accept a user using the same idempotency key for events against
different metrics as seperate isolated requests.
different metrics as separate isolated requests.
</Note>

Additionally, when using an idempotency key the response will contain two properties to help clients manage replayed requests effectively:

{/* vale off */}

```json
{
...,
Expand All @@ -54,9 +56,11 @@ Additionally, when using an idempotency key the response will contain two proper
}
```

{/* vale on */}

<Note>
By default Trophy uses an infinte time window for detecting duplicate events.
If you feel you need different behavoir, please [get in
By default Trophy uses an infinite time window for detecting duplicate events.
If you feel you need different behavior, please [get in
touch](mailto:support@trophy.so) and we'll happily set that up for you.
</Note>

Expand Down
Binary file modified assets/platform/leaderboards/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion experimentation/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A key part of running a gamified platform is experimentation — tweaking and op
Usually, you'd have to build these tools yourself, but with Trophy you get an experimentation stack out-of-the-box.

<Note>
We have plans to extend Trophy's experimentation capibilities in the future to
We have plans to extend Trophy's experimentation capabilities in the future to
support more broad A/B testing of your gamification features.
</Note>

Expand Down
2 changes: 1 addition & 1 deletion getting-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Here you'll integrate your backend web application with Trophy and start buildin
Create friendly competitions to increase user engagement.
</Card>
<Card title="Emails" icon="mail" href="/platform/emails">
Deliver personalized lifecyle emails to users at the perfect moment.
Deliver personalized lifecycle emails to users at the perfect moment.
</Card>
</CardGroup>

Expand Down
12 changes: 6 additions & 6 deletions guides/tutorials/how-to-build-a-gamified-study-platform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Would you like to use Turbopack for `next dev`? Yes
Would you like to customize the import alias (`@/*` by default)? No
```

Next, we'll initialize a new install of everyones favourite UI library, shadcn/ui:
Next, we'll initialize a new install of everyone's favourite UI library, shadcn/ui:

```bash
npx shadcn@latest init
Expand Down Expand Up @@ -458,7 +458,7 @@ export default function Flashcard({ flashcard }: Props) {

You'll notice we also added a couple of styles here. These do a couple of things:

- Ensure that when a `<Card />` is flipping, the 'backface' isn't visible during the animation with `backface-visibility: hidden;`
- Ensure that when a `<Card />` is flipping, the 'back face' isn't visible during the animation with `backface-visibility: hidden;`
- As the `<Card />` component is a child of the `<motion.div />`, usually it would appear flat when it's parent rotates in 3D. Adding `transform-style: preserve-3d;` to the `<Card />` ensures it keeps it's 3D effect when it's parent animates.

```css src/app/flashcard.module.css
Expand Down Expand Up @@ -683,7 +683,7 @@ In this section we'll be adding the following gamification elements to the flash
- Achievement unlocked
- Weekly progress summaries

This might sound like a lot, but would you be surprised if I told you you could build all this in less than 10 lines of code?
This might sound like a lot, but would you be surprised if I told you could build all this in less than 10 lines of code?

Yup, you can. Trophy makes it super easy to build these features with a few lines of integration code.

Expand Down Expand Up @@ -1178,7 +1178,7 @@ To see this in action, all we need to do is unlock our first achievement by view

#### Streak Extended Toasts

We'll use the same methods to show similar toasts when a user extendeds their streak. As we've set up a daily streak in Trophy, this will trigger the first time a user views a flashcard each day.
We'll use the same methods to show similar toasts when a user extends their streak. As we've set up a daily streak in Trophy, this will trigger the first time a user views a flashcard each day.

<Tip>
If we wanted to experiment with a different streak cadence, like a weekly
Expand Down Expand Up @@ -1407,9 +1407,9 @@ export default function Flashcards({ flashcards }: Props) {

#### Displaying Study Journey

The last peice of UI we'll add will be a dialog to display the user's study progress, including their streak and any achievements they've unlocked so far.
The last piece of UI we'll add will be a dialog to display the user's study progress, including their streak and any achievements they've unlocked so far.

First, we'll add a couple of new server actions to fetch the users streak and achievements from Trophy. As we're using a daily sterak here, we'll fetch the last 14 days of streak data from Trophy to give us enough to work with in our UI:
First, we'll add a couple of new server actions to fetch the users streak and achievements from Trophy. As we're using a daily streak here, we'll fetch the last 14 days of streak data from Trophy to give us enough to work with in our UI:

```tsx src/app/actions.ts [expandable] {6-7,10-11,24,33,45-58,60-73}
"use server";
Expand Down
24 changes: 14 additions & 10 deletions platform/achievements.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ To create new achievements, head to the [achievements page](https://app.trophy.s
</Step>

<Step title="Add attribute filters (Optional)">
You can assign _attribute filters_ to an achievement to further restrict who can unlock them and when.
You can assign attribute filters to an achievement to further restrict who can unlock them and when.

- To limit a **Metric** achievement to only apply to events with specific [custom event attributes](/platform/events#custom-event-attributes), select an attribute and enter a value in the **Event Attribute** section.

Expand Down Expand Up @@ -172,22 +172,22 @@ When you make an achievement active, it makes it 'live'. Users can complete it a

When you lock an achievement, users who haven't unlocked it yet won't be able to unlock it anymore, but users who have already unlocked it won't be affected.

Locked acheivements are only returned in APIs for users who have already achieved them.
Locked achievements are only returned in APIs for users who have already achieved them.

**Archived**

Archvied achievements can't be completed and aren't returned in any achievement APIs.
Archived achievements can't be completed and aren't returned in any achievement APIs.

<Warning>
Once you archive an achievement it disapears from Trophy so be sure to only
Once you archive an achievement it disappears from Trophy so be sure to only
archive achievements that you no longer need.
</Warning>

Archived achievements can be restored by [contacting support](#get-support).

### Acheivement Workflow
### Achievement Workflow

Achievements can be moved through different statuses according to the following workfow:
Achievements can be moved through different statuses according to the following workflow:

```mermaid
flowchart LR
Expand Down Expand Up @@ -226,6 +226,8 @@ However if you're using any API achievements, you will have to mark them as comp

This will return back a response that contains details of the achievement that was completed that can be used in any post-completion workflows, like showing an in-app notification.

{/* vale off */}

```json Response
{
"completionId": "0040fe51-6bce-4b44-b0ad-bddc4e123534",
Expand All @@ -241,19 +243,21 @@ This will return back a response that contains details of the achievement that w
}
```

{/* vale on */}

## Backdating Achievements

By default, whenever you move an achievement to 'Active' [status](#managing-achievements), Trophy will check if any existing users meet the requirements of the achievment and complete it for them behind the scenes.
By default, whenever you move an achievement to 'Active' [status](#managing-achievements), Trophy will check if any existing users meet the requirements of the achievement and complete it for them behind the scenes.

This means when you release new achievments into production, or edit an existing live achievement, backdating will happen automatically.
This means when you release new achievements into production, or edit an existing live achievement, backdating will happen automatically.

<Note>
When achievements are completed in this way, users don't receive any
notifications this has happened. This is to prevent changes to your
achievements in Trophy resulting in users getting lots of notifications.
</Note>

You can check how many users have completed achievements at any time on the [acheivements page](https://app.trophy.so/achievements) in the Trophy dashboard. The _Users_ column in the acheivements can update during backdating.
You can check how many users have completed achievements at any time on the [achievements page](https://app.trophy.so/achievements) in the Trophy dashboard. The _Users_ column in the achievements can update during backdating.

<Frame>
<img
Expand Down Expand Up @@ -317,7 +321,7 @@ To display a high-level overview of all achievements users can complete, use the
></video>
</Frame>

The all achievements endpoint returns a list of all achievements within your Trophy account. Each achievement returned also includes `completions` (the number of users who have compelted the acheivement) and `rarity` (the percentage of users who have completed the achievement) as follows:
The all achievements endpoint returns a list of all achievements within your Trophy account. Each achievement returned also includes `completions` (the number of users who have compeleted the achievement) and `rarity` (the percentage of users who have completed the achievement) as follows:

<AllAchievementsResponseBlock />

Expand Down
10 changes: 5 additions & 5 deletions platform/emails.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ If you specify a timezone for each user through [User Identification](/platform/
Trophy has a fully-featured block-based email builder that allows you to design templates, controlling all email copy and subject lines. Within the [Emails](https://app.trophy.so/emails/configure) page you can create templates and assign them to the 3 different [Email Types](#types-of-emails).

<Tip>
When you create an email template, it can simulatenously be used across as
When you create an email template, it can simultaneously be used across as
many email types as you want. So if you want your emails to be simple, just
having one email template might be enough. Otherwise, general best practice is
creating one template for each type of email you want to send.
Expand Down Expand Up @@ -398,7 +398,7 @@ Here's the full list of un-opinionated basic blocks that Trophy supports:
- **H1, H2, H3** - Useful for headings of varying sizes.
- **Button** - Creates a call to action for users to take in emails.
- **Card** - Can nest other blocks, focusing attention.
- **Divider** - Good for seperating content into logical sections.
- **Divider** - Good for separating content into logical sections.
- **Emoji** - Include any supported emoji, controlling size.
- **Image** - Upload any image and Trophy will render it in emails.
- **Spacer** - Good for giving blocks room to stand out.
Expand All @@ -411,7 +411,7 @@ Trophy also has a powerful conditional rendering system powered by the _Conditio

By nesting any other block inside a conditional block and setting up the conditions logic, you can create almost any email design that will show different blocks in emails based on the evaluation of conditions at send time.

If you're familiar with the `if/else` logical operators then this will feel very famililar to you. Otherwise here's a quick diagram to explain how it works.
If you're familiar with the `if/else` logical operators then this will feel very familiar to you. Otherwise here's a quick diagram to explain how it works.

```mermaid
flowchart LR
Expand Down Expand Up @@ -609,8 +609,8 @@ Similarly to metrics, each points system has the following variables that can be

When configuring a template for use with achievement emails, the following variables are available:

- **Is Final Achievement**: If the achievement triggering the email is part of a series of metric achievements, this is true when the achievment is the final achievement in the series
- **Percent To Next Achievement**: If the achievement triggering the email is part of a series of metric achievements, this is the percentage until the user unlocks the next achievment in the series
- **Is Final Achievement**: If the achievement triggering the email is part of a series of metric achievements, this is true when the achievement is the final achievement in the series
- **Percent To Next Achievement**: If the achievement triggering the email is part of a series of metric achievements, this is the percentage until the user unlocks the next achievement in the series
- **Achievement Name**: The name of the achievement that triggered the email
- **Achievement Description**: The description of the achievement that triggered the email

Expand Down
6 changes: 3 additions & 3 deletions platform/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ You can specify a number of custom event attributes to help you track additional

For example, a language learning app might have a 'Questions Completed' metric and use a custom event attribute to store wether the answer to each question was correct.

Similarly a fitness app might use an 'Excercises Completed' metric and use a custom event attribute to store the weight that was used in each excercise and another custom event attribute to store how long the excercise lasted.
Similarly a fitness app might use an 'Exercises Completed' metric and use a custom event attribute to store the weight that was used in each exercise and another custom event attribute to store how long the exercise lasted.

Using custom event attributes in this way allows you to enrich events in Trophy with additional context relevant to your use case and use it to power even more engaging gamification features.

### Creating Attibutes
### Creating Attributes

To create a new custom event attribute, head to the metrics page in the Trophy dashboard and hit the _Add Event Attribute_ button.

Expand Down Expand Up @@ -69,7 +69,7 @@ If you receive an error similar to the following then you might have miss-spelle

```json
{
"error": "Invalid attribute keys: devce. Please ensure all attribute keys match those set up at https://app.trophy.so/metrics."
"error": "Invalid attribute keys: device. Please ensure all attribute keys match those set up at https://app.trophy.so/metrics."
}
```

Expand Down
4 changes: 2 additions & 2 deletions platform/leaderboards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ As the start of the week can be different in different countries, there is some

We'll be adding better support for weekly leaderboards in the future based on customer requests, so if that's you [let us know](mailto:support@trophy.so)! However Trophy leaderboards will cover 90% of weekly use cases, so here's what we suggest if you want to set one up.

To create a weekly leaderboard, set up a [repeating leaderboard](#repeating-leaderboards) on a 7 day schedule and set the start date to be the next occuring first day of the week. While you wait for the start date to come around, the leaderboard will be in `scheduled` status and will automatically go live on the start date.
To create a weekly leaderboard, set up a [repeating leaderboard](#repeating-leaderboards) on a 7 day schedule and set the start date to be the next occurring first day of the week. While you wait for the start date to come around, the leaderboard will be in `scheduled` status and will automatically go live on the start date.

This will make sure each run of the leaderboard consistently tracks the start and end of each week that your users are familiar with.

Expand Down Expand Up @@ -104,7 +104,7 @@ Leaderboards with a start date in the future are scheduled and automatically go

### End Dates

Leaderboards in Trophy can have end dates. If you set an end date on a leaderboard then after that date it will enter `finished` status and rankings will be be finalized and winners chosen.
Leaderboards in Trophy can have end dates. If you set an end date on a leaderboard then after that date it will enter `finished` status and rankings will be finalized and winners chosen.

<Note>
Due to differences in [time zones](#handling-time-zones), leaderboards can be
Expand Down
4 changes: 2 additions & 2 deletions platform/metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ To create a Metric, head over to the [Metrics](https://app.trophy.so/metrics) pa
</Step>

<Step title="Configure settings">
Configure additional settigns like metric units or currency if applicable on the metric configure page.
Configure additional settings like metric units or currency if applicable on the metric configure page.
</Step>
</Steps>

Expand All @@ -69,7 +69,7 @@ Trophy has a built-in analytics dashboard for each metric you create. It shows y
- The total value of all tracked events against the metric
- The number of users actively making progress against the metric
- The metric's [Trophy Retention Impact Score](#trophy-retention-impact-score)
- The metric's [Achievment Completion Chart](#achievment-completion-chart)
- The metric's [Achievement Completion Chart](#achievement-completion-chart)

<Frame>
<img
Expand Down
Loading