Migrating from 2.x to 3.x version

This guide shows how to migrate from 2.x to 3.x versions of the Fuul Web SDK

There is only a minor breaking change when upgrading the Fuul SDK to the 3.x versions:

The generateTrackingLink method now returns a Promise<string> instead of a string. It now also accounts for affiliate codes created by the affiliateAddress argument.

v1.x/v2.x

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

const trackingLinkUrl = Fuul.generateTrackingLink(
    baseURL, affiliateAddress)

// Returns
"http://yourwebsite.com?af=<affiliateAddress>"

v3.x

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

const trackingLinkUrl = await Fuul.generateTrackingLink(
    baseURL, affiliateAddress)

// Returns
"http://yourwebsite.com?af=<affiliateAddressOrCode>"

For more information on getting the affiliate link, check out this guide.

Last updated