Last updated

getCountryCode()

Gets the current country code.

Signature

const countryCode = window.FairShareSDK.getCountryCode();

Returns

string — The current country code (e.g., "US", "CA", "GB").

Example

const countryCode = window.FairShareSDK.getCountryCode();
console.log('Current country:', countryCode); // e.g., "US"