Skip to main content
FairShare is Fluid’s JavaScript SDK that resolves one of the hardest problems in direct sales e-commerce: knowing which rep deserves credit for a sale when buyers move across multiple websites, clear cookies, or share links. Install a single script tag on any website — whether it runs on the Fluid platform or not — and FairShare starts capturing attribution data immediately, surfacing widgets for cart, lead capture, and media alongside it.

How FairShare Works

FairShare runs entirely in the browser. When a visitor lands on a page that carries the FairShare script, the SDK evaluates all available signals to determine rep attribution and stores that attribution for the duration of the shopping session.

Installation

Add the following script tag to the <head> of any page where you want attribution tracking and widgets:
Replace your-shop-identifier with the FairShare shop identifier from your Fluid dashboard. The async attribute ensures the script loads without blocking your page render.

Attribution Methods

FairShare uses three complementary methods to identify the rep behind a visit. Using all three together maximises attribution accuracy across the scenarios you’ll encounter in the real world:
  • Cookies — When a rep’s link is clicked, FairShare writes a first-party cookie to the visitor’s browser. Subsequent visits from the same browser on the same domain resolve attribution from this cookie.
  • Browser fingerprints — FairShare builds a lightweight fingerprint from browser and device characteristics. This provides attribution continuity even when cookies are cleared or unavailable.
  • URL-based routes — Reps share URLs that encode attribution data directly in the path or query string. FairShare reads these parameters on page load and uses them as the highest-confidence attribution signal.

Attribution Priority Order

When multiple attribution signals are present simultaneously, FairShare resolves them in the following order — earlier entries take precedence over later ones:
  1. share-guid — a unique share identifier embedded in the rep’s link
  2. fluid-rep-id — the rep’s Fluid platform identifier
  3. email — the rep’s registered email address
  4. username — the rep’s Fluid username
  5. external-id — an identifier from an external system

What FairShare Enables

Beyond attribution tracking, FairShare gives you a suite of embeddable widgets you can deploy on any page:
  • Cart widget — A slide-out or inline cart that lets buyers add products and proceed to checkout without leaving your page. The cart is automatically scoped to the attributed rep.
  • Lead capture widget — A form that collects visitor contact information and associates leads with the attributed rep in your Fluid dashboard.
  • Media widget — Embed product images, videos, and rich media hosted on the Fluid platform directly on external sites.
  • Real-time cart updates — FairShare integrates with Pusher to push live cart changes (items added, quantities updated, discounts applied) to the buyer’s browser without a page refresh.

Configuration Attributes

You control FairShare’s behaviour using data-* attributes on the script tag. The table below lists all supported attributes:
FairShare can be installed on any website — it is not limited to sites built on or hosted by the Fluid platform. This means you can add attribution tracking to existing storefronts, marketing sites, or landing pages without migrating to Fluid’s hosting.

Next Steps

Once FairShare is installed and attribution is flowing, you can connect it to your checkout experience and commission workflows. For full setup instructions including widget configuration, domain allowlisting, and testing your attribution data, see the SDK Installation guide.