Fuul
  • INTRO
    • ⚑What is Fuul?
    • πŸ’ͺWhy use Fuul?
    • πŸ€”Use Cases
    • βš™οΈIntegration
    • πŸ”—Main Links
  • HOW IT WORKS
    • πŸ’ΈTypes of Rewards
    • βœ…Conversion Events
      • 1️⃣CLAMM LPs (e.g. Uniswap V3)
      • 2️⃣Constant LPs (e.g., Uniswap V2)
      • 3️⃣Lending & Borrowing
      • 4️⃣Staking
      • 5️⃣Token Holders
      • 6️⃣Custom Onchain Events
      • 7️⃣Custom Offchain Events
  • πŸ€‘Incentive Payouts
    • πŸ—ΏFixed Rewards
    • 🌊Variable Rewards
    • πŸ’°Pool Distribution
  • πŸ§‘β€πŸ€β€πŸ§‘Referrals
  • ♾️Attribution Methods
  • πŸ’²Budgets
  • ⚑Fuul Incentives Manager
  • πŸŽ–οΈLeaderboards
  • πŸ’»Incentives Hub
    • πŸ‘¨β€πŸ’»White-Label Implementation
    • πŸ‘No-Code
  • FOR DEVS
    • ⭐Getting started with Fuul Web SDK
    • βš™οΈSending Custom Events through the API
    • πŸ“„Tracking referrals in your app
    • πŸ‘¨β€πŸ’»API Key Management
    • πŸ› οΈBuilding your incentives hub in your app (white-label)
      • ℹ️Getting all incentives information
      • πŸ”—Creating affiliate links or codes
      • πŸ’―Getting Leaderboard Data
        • πŸͺ™Tokens
        • 🌟Points
      • πŸ™‹Getting Individual Rewards
        • πŸͺ™Tokens
        • 🌟Points
      • πŸ€™Claiming Onchain Rewards
    • πŸ”§Building widgets
    • πŸ“’Managing Audiences and Segments
      • πŸ‘€Getting User Audiences using Fuul SDK
      • πŸ‘₯Updating Audience Segments using Fuul API
    • ✈️Migration from older SDK versions
    • πŸ†˜Troubleshooting
  • PROTOCOL
    • ⛓️Smart Contracts
    • 🧡Subgraphs
  • Guides
    • ✏️Getting Started
      • Creating Your First Incentive Program
      • How to Add a Budget in Fuul
  • 🏁Creating Triggers & Conversions
    • Understanding Triggers Types
    • Creating an Event with CSV file
  • 🎨Program Incentive Page
    • Building no code landing pages
  • πŸ“ŠAnalytics
    • Understanding Sybil Detection
Powered by GitBook
On this page
  • Referral Invitation
  • Referral Widget
  1. FOR DEVS

Building widgets

Referral Invitation

Getting user current affiliate

This article shows how to get the affiliate that will receive the rewards in the case that the user converts.

Getting affiliate per conversion

To get the affiliate for a specific user use the getUserAffiliates method.

import { Fuul } from ('@fuul/sdk');

await Fuul.getUserAffiliates({ user_address: '0x12345' })

Notice that every conversion may have different attribution type (first/last click) or conversion window.

An example response would be the following:

[
  {
     conversion_name: "My Conversion",
     affiliate_address: "0x12345",
  },
  {
     conversion_name: "My Second Conversion",
     affiliate_address: "0x12345",
  }
]

Referral Widget

PreviousClaiming Onchain RewardsNextManaging Audiences and Segments

Last updated 6 months ago

Find all you need to know in .

πŸ”§
this guide