Set up user referrals

When a user refers a friend to download and sign up to your app, you can send them a custom in-app reward.

The user referrals setup consists of the following steps:

  1. Create a custom link for your referral program. This link will then need to be placed behind the invite component in your app.
  2. Append a label parameter. A label parameter will serve for passing a unique referral ID. You will need to instruct your app to populate the label parameter with the referral ID before sending the link URL to the invited user.
  3. Configure passing referral IDs to your systems. Set up attribution callback or server callbacks to receive the referral ID when a new user downloads and opens the app via referral link. Your system will then need to apply the user reward based on the received referral ID.

Before you begin

Here's what you need to do before setting up user referrals:

  • If your app targets iOS, ensure that probabilistic modeling is enabled. This ensures referrals work in a mobile web environment.
  • Check that your system is set up to deliver user rewards by generating and applying referral codes. Please make sure to check the following:
    • Your server can generate a referral ID when a user taps the invite share button.
    • Your server can populate the label placeholder with the referral ID.
    • Your server can process the value of the label placeholder from the Adjust callback to apply a reward to the referring account, referred account, or both.

1. Create a custom link for your referral program

See also:

Adjust allows you to create short links using your brand name. For example: example.go.link. This establishes link authenticity, improves brand consistency, and increases click-through rates. See the Set up a branded domain guide for more information.

  1. Follow the Custom link setup guide.
  2. Consider enabling probabilistic modeling in the attribution settings which will ensure attribution accuracy in various placements.

2. Append a label parameter to the link

Adjust uses the label parameter to receive custom data unrelated to attribution data. For user referrals, you can use it to tag your app users with a unique ID.

Make sure to append a label parameter to your custom link along with your other parameters. You may want to use a branded link for improved user experience.

Branded link
Non-branded link
https://example.go.link?adj_t=abc123&adj_label={user_id}
Note:

The label parameter value isn't available in Datascape and networks can't receive the value through postbacks. This parameter is available only in your raw data export or at the SDK level via attribution callbacks.

If you use server callbacks to share your referral ID with Adjust, you can use a dynamic callback parameter.

3. Configure passing referral IDs to your systems

When the invited user downloads and opens the app, one of the following happens:

  • Attribution callback: The Adjust SDK receives an attribution callback containing the label parameter populated with a referral ID, which your app can collect.
  • Install callback: Your server receives an install callback from Adjust containing a referral ID using either the label parameter or a dynamic callback parameter.

Your system then needs to apply the user reward based on the received referral ID.

Attribution callback (Recommended)

Important:

Adjust can't share user information on iOS if the user doesn't provide App Tracking Transparency (ATT) consent per Apple's privacy policy. Contact your Adjust representative or support@adjust.com for further information on this topic.

Attribution callbacks allow you to receive a label parameter that contains a unique referral ID within your app immediately after the user installs the app via a referral link and gets attributed to the custom referral link. Follow the attribution callback guide to set this up in your app:

Install callback

Server install callbacks allow you to receive a callback with a referral code to your BI server. See the Set up server callbacks guide for more information.

Follow these steps to set up install callbacks:

  1. Access the server callback setup from your app card or from the Data management tab of your app setup.
    • (Admin, Editor, or Custom Editor permissions only) To set up a server callback from the app card, under AppView, select All apps. Find your app and select Server callbacks.
    • To set up a server callback from the Data management tab of your app setup, under AppView, select All apps. Select your app, and then select the Data management tab.
  2. Under Server callbacks, select Add callback > Guided setup.
  3. In the Callback trigger list, select “install” activity
  4. In the Server endpoint field, enter an endpoint URL where you can receive your data.
  5. (Optional) Select Add a condition to add a condition in combination with placeholders and values. The callback would be triggered only if the condition is satisfied.
  6. Select Add a placeholder in the Placeholders section and choose {install} from the list to dynamically include user referral code data in your callback. You can add multiple placeholders.
  7. Select Create callback URL to generate the encoded callback URL.

Here is an example of the callback URL with appended label parameter and the recommended placeholders:

https://myendpoint.test/?label={label}&adid={adid}&tracker_name={tracker_name}&gps_adid={gps_adid}&idfa={idfa}&idfv={idfv}&app_name={app_name}&activity_kind={activity_kind}&created_at={created_at}

Reporting

Adjust Datascape provides aggregated reporting for your referral link. The label parameter value doesn't appear anywhere in Datascape and is only available via attribution callback or in your raw data export.

Testing Guide

Tip:

Make sure to follow the forget device instructions between tests on the same test device.

Follow the next steps to test your User Referrals setup:

  1. Place the generated custom link with the appended label parameter behind the invite component in your app.
  2. Select the invite component and copy the link. Make sure the label parameter is populated with a referral code.
  3. Paste the link in a messenger or other environment your user will use to share the link.
  4. Prepare a test device by following the Before you begin section in the Testing Console guide.
  5. Select the link.
  6. Check device data in the Testing Console by following these instructions.
  7. Verify that you received the label parameter in your attribution callbacks or via the server callback in your BI system.
  8. Grant the reward based on the received referral code.