Gameball Developers Guide
v3.0
v3.0
  • Introduction
  • What's New in V3.0
  • Installing Gameball
    • Web
      • Show Gameball Customer Widget
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Go-Live Checklist
    • iOS
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • Android
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • React Native
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
      • Migration from v1 to v2
    • Flutter
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Go-Live Checklist
    • Generic Mobile App
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
    • Retail & Modern POS
      • Initialize Gameball Customer Profile
      • Track Orders & Cashback Reward
      • Track Refunds
      • Enable Redemption
        • Prepare POS for Redemption
        • Using Virtual ID
          • Using Virtual Card
  • REST API
    • Overview
      • Server-Side SDKs
    • Authentication
    • API Reference
      • Customer
      • Event
      • Transactions
      • Order
      • Coupons
      • Leaderboard 👑
      • Notifications 👑
      • Configurations 👑
      • Batches 👑
        • Batch Operations Data
      • OTP
      • Partner 🤝
        • Client 🤝
        • Redemption Rule 🤝
        • Cashback Rule 🤝
    • Webhooks
      • Notifications Webhook
      • Customer Profile Webhook
    • Errors
    • Object Reference
  • Tutorials
    • Build Custom UI Elements 👑
      • Display Reward Campaign Progress
      • Show VIP Tiers
      • Show Customer Points Balance
      • Build Leaderboards
      • Show Notifications Inbox
      • Adapt UI to Configurations
      • Advanced UI Techniques
        • Increase Sales with Cashback UI Elements
        • Derive Engagement with Rewards Campaigns UI Elements
    • Tracking Customer Events
    • Build your Own Notification System
    • Checkout Integration Example
    • Redemption Integration Options
      • Redeem with coupon system
        • Integrate your coupon system
          • Example using e-commerce platform(WooCommerce)
          • Example using a custom coupon system
        • Build couponing experience
          • Using Gameball widget
          • Build custom experience
            • Showing customers available points
            • Allowing customers to create coupons
            • Apply the discount code to your cart
        • Coupon integration reference
      • Redeem with direct debt
        • Get customers points balance
        • Redeem customer points
  • Third Party Integrations
    • Segment Integration
Powered by GitBook
On this page
  • Overview
  • Tracking Referral Signups
  • Tracking Referral Using Widget
  1. Installing Gameball
  2. Web

Track Referrals

Reward your customers for referrals and grow your business

PreviousIntegrate RedemptionNextGo-Live Checklist

Last updated 1 year ago

Overview

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 customer can find their code in their widget to share it with friends..

From a technical point of view, first you need to show your customers their referral link; for that you use the Retrieve Customer endpoint to get the customer's link. Second once your customers 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 customer body request, and Gameball automatically links them.

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

For example if you have configured your website URL to be http://www.myAwesomeWebsite.com the referral link for Customer "John Snow" with referral code code123 would be

http://www.myAwesomeWebsite.com?ReferralCode=code123

Your customers 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 customer will be able to find the unique referral link on the referral tab inside Gameball customer profile widget

Tracking Referral Signups

When a referral lands on your website with a referral link

http://www.myAwesomeWebsite.com?ReferralCode=code123

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.

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

curl -X POST -H 'apiKey: {{Your_API_Key}}' -d '{
  "playerUniqueId":"new_player_id",
  "playerAttributes":{
      "displayName":"Arya Stark",
      "firstName": "Arya",
      "lastName": "Stark",
      "email":"arya.stark@example.com"
  	},
   "referrerCode": "code123",
  }' -v -i 'https://api.gameball.co/api/v3.0/integrations/player'

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.

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

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

article
Learn more about the Gameball referral program
here
Create Customer API