Skip to content

Commit 2d9be5f

Browse files
committed
embed UX image, referrer_id changes
1 parent 45f90da commit 2d9be5f

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

docs/activities/Development_Guides.mdx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -896,11 +896,11 @@ This example is being done entirely on the client, however, a more common patter
896896
897897
Incentivized sharing can help grow your Activity through network effects. You can use links in several different ways such as:
898898
899-
1. **Referral links.** Users can copy referral links inside your Activity, which include their referrer ID (`https://discord.com/activities/<your Activity ID>?referrer_id=123`), and they can send to their friends. If their friend accepts and starts playing your game, then you gift the referrer something inside your game.
899+
1. **Referral links.** Users can copy referral links inside your Activity, which include their Discord user ID (`https://discord.com/activities/<your Activity ID>?referrer_id=123456789`), and they can send to their friends. If their friend accepts and starts playing your game, then you gift the referrer something inside your game.
900900
2. **Promotions.** You can run a temporary promotion on social media, where you offer a reward if they start playing now. Share a custom link on your social media (`https://discord.com/activities/<your Activity ID>?custom_id=social012025` ). Anyone who clicks that specific link receives something inside your game.
901-
3. **Social deep-links.** Currently, when users launch an Activity, they all land in the same place. Instead, you can start deep-linking to contextually relevant points in your game. For example, user A can copy a link inside your Activity for engaging other users (`https://discord.com/activities/<your Activity ID>?referrer=123&custom_id=visit-location`), and sends the link to their friends in a DM or channel. Then, user B who clicks the link gets taken directly to user A’s location.
901+
3. **Social deep-links.** Currently, when users launch an Activity, they all land in the same place. Instead, you can start deep-linking to contextually relevant points in your game. For example, user A can copy a link inside your Activity for engaging other users (`https://discord.com/activities/<your Activity ID>?referrer=123456789&custom_id=visit-location`), and sends the link to their friends in a DM or channel. Then, user B who clicks the link gets taken directly to user A’s location.
902902
4. **Turn-based deep-links.** When you send an “it’s your turn” DM to a user, you can include a link which takes them directly to the right game instance and the turn they need to take.
903-
5. **Affiliate marketing.** You can work with affiliates (influencers, companies, etc) to advertise your game to their followings, and reward them via a custom link (`https://discord.com/activities/<your Activity ID>?referrer_id=influencer1`). Then, for every user that starts playing because of said influencer, you can then pay out to the influencer.
903+
5. **Affiliate marketing.** You can work with affiliates (influencers, companies, etc) to advertise your game to their followings, and reward them via a custom link (`https://discord.com/activities/<your Activity ID>?custom_id=influencer1`). Then, for every user that starts playing because of said influencer, you can then pay out to the influencer.
904904
6. **Source attribution.** You can use the `custom_id` parameter to figure out how much traffic you’re getting from different marketing sources.
905905

906906
This guide covers implementing a referral link which will feature a reward system for users who share links and those who click them.
@@ -926,7 +926,7 @@ try {
926926
const { success } = await discordSdk.commands.shareLink({
927927
message: 'Click this link to redeem 5 free coins!',
928928
custom_id: customId,
929-
// referrer_id is optional - if omitted, the current user's ID is used
929+
// referrer_id is optional - if omitted, the message's author user ID is used
930930
});
931931

932932
if (success) {
@@ -983,6 +983,7 @@ async function handleReferral() {
983983
- Track and validate referrals to prevent abuse
984984
- Handle edge cases like expired promotions gracefully
985985
- Consider implementing cool-down periods between shares
986+
- Do not use or override `referrer_id` directly. When set, `referrer_id` will always be a Discord snowflake-type user ID, otherwise it will be set to the message's author id.
986987
987988
---
988989
@@ -996,7 +997,7 @@ This guide covers creating a customizable [Incentivized Link](#DOCS_ACTIVITIES_D
996997
2. On the Custom Links page, click `Create New` to create a new link.
997998
3. You will need to upload an image with an aspect ratio of 43:24.
998999
4. Title, and description is also required.
999-
5. All other fields are optional but you are able to customize the primary button's label as well as add a referrer_id and custom_id to the link. Explicit referrer_id and custom_id on the link itself will always override the set referrer_id and custom_id.
1000+
5. All other fields are optional but you are able to customize the primary button's label as well as acustom_id to the link. An explicit `custom_id` query parameter on the link itself will always override the set custom_id.
10001001
6. Click Save.
10011002
10021003
#### Editing a Link
@@ -1007,7 +1008,7 @@ This guide covers creating a customizable [Incentivized Link](#DOCS_ACTIVITIES_D
10071008
10081009
#### Copying a Link
10091010
1010-
Once you're satisfied with your changes you can click on the copy icon on the row, it'll change colors to green indicating that it copied to your clipboard. You are now able to share this link anywhere. The link will look like: `https://discord.com/activities/<your Activity ID>?link_id=0-123456789`. Even if you've set a `referrer_id` and/or a `custom_id`, it won't be explicitly included in the link but will be loaded once a user clicks on the link. You can then further shorten this URL if you'd like.
1011+
Once you're satisfied with your changes you can click on the copy icon on the row, it'll change colors to green indicating that it copied to your clipboard. You are now able to share this link anywhere. The link will look like: `https://discord.com/activities/<your Activity ID>?link_id=0-123456789`. Even if you've set a `custom_id`, it won't be explicitly included in the link but will be loaded once a user clicks on the link. You can then further shorten this URL if you'd like.
10111012

10121013
#### Deleting a Link
10131014

@@ -1021,6 +1022,12 @@ Once you're satisfied with your changes you can click on the copy icon on the ro
10211022
- Track and validate referrals to prevent abuse
10221023
- Gracefully handle expirations in your activity for any custom links that are limited time but still live off-platform.
10231024
1025+
#### User Experience
1026+
1027+
![custom-link-embed](activities/custom-link-embed.png)
1028+
1029+
Users will see an embed with your information displayed. Clicking "Play" opens the activity and passes through the `custom_id` you've set. A `referrer_id` will be present for links shared on Discord.
1030+
10241031
---
10251032

10261033
### Preventing unwanted activity sessions
162 KB
Loading

0 commit comments

Comments
 (0)