Last updated

getAttribution()

Gets the current attribution data.

Signature

const attribution = window.FairShareSDK.getAttribution();

Returns

Attribution — Attribution data object.

Attribution Object:

PropertyTypeDescription
affiliate_idnumberAffiliate ID
share_guidstringShare GUID
sourcestringAttribution source

Example

const attribution = window.FairShareSDK.getAttribution();

console.log('Attributed to:', attribution.affiliate_id);
console.log('Share GUID:', attribution.share_guid);
console.log('Source:', attribution.source);