Track Referrals

Reward your players for referrals and grow your business


Referrals is a marketing strategy that allows your business to grow by utilizing your customers' friends' recommendation through word of mouth. Gameball lets you to integrate a referral system that helps facilitates the referral process for your current customers and their friends.

The process takes place through generating a unique referral code (referral URL) by Gameball. Each player can find their code in their widget to share it with friends. Learn more about the Gameball referral program.

From a techincal point of view, first you need to show your players their referral link; for that you use the Retrieve Player endpoint to get the player's link. Second once your players share their referral link with any of their friends and they sign up to your platform; you have to link the referrer and the referree to each other. When the referree signs up, you will add the referrer code in the Create Player body request, and Gameball automatically links them.

The unique code is concatenated with your website URL configured on Gameball dashboard (Click here to learn more) to form the Player Referral Link.

For example if you have configured your website URL to be the referral link for Player "John Snow" with referral code code123 would be

Your players can then exchange their referral link with their referrals so that they can get rewarded for their referrals if they signed up and fulfill the requirement as configured on your referral program. Every player will be able to find the unique referral link on the referral tab inside Gameball player profile widget

Check this article to learn how the referral module will appear in your players' profile on Gameball widget.

Tracking Referral Signups

When a referral lands on your website with a referral link

You can detect that by checking URL query strings for ReferralCode. If detected, you can then store the ReferralCode value on the user's session or leverage the browser local storage, session storage, or cookies.

Once the guest referral sign-ups, you can then send the ReferralCode along with the sign-up data of the new player via the Create Player API.

Below is a sample API call to create a new player "Aria Stark" that is being referred by Player "John Snow" with referral code code123

curl -X POST -H 'apiKey: {{Your_API_Key}}' -d '{
      "displayName":"Arya Stark",
      "firstName": "Arya",
      "lastName": "Stark",
   "referrerCode": "code123",
  }' -v -i ''

Tracking Referral Using Widget

If you have embedded The Gameball Profile Widget into your web page, you can relay on it to handle referral for you. The widget will internally

  1. Check for ReferralCode query parameter in the URL

  2. Store it in session storage

  3. Send it along its parameters when a new profile is created.

Last updated