Skip to main content
The Everflow JavaScript SDK enables client-side tracking directly on your website. It supports direct linking — tracking user activity without requiring a redirect through a tracking link. This is useful when third-party links or cookies cannot be used.
The JavaScript SDK is not optimized for Internet Explorer.

Installation

Via npm

npm install @everflow/everflow-sdk
import EverflowSDK from "@everflow/everflow-sdk";

EverflowSDK.configure({ tracking_domain: "YOUR-TRACKING-DOMAIN.com" });

Via script tag

Add the SDK script tag to every page where you want to track events. Replace YOUR-TRACKING-DOMAIN.com with your actual Everflow tracking domain:
<script type="text/javascript" src="https://www.YOUR-TRACKING-DOMAIN.com/scripts/main.js"></script>
The script exposes the global EF object with methods for click tracking, conversion tracking, and impression tracking.

GitHub Repository

View the source code, report issues, and contribute on GitHub.

Page load performance

If the SDK script slows down page load, you have a few options:
  • Load it last — place the script tag just before the closing </body> tag so it doesn’t block above-the-fold content.
  • Self-host the file — download main.js and serve it from your own domain to avoid a third-party request. The served file already has your tracking domain baked in, so it works as-is — but it’s a frozen snapshot that won’t pick up SDK updates. For a maintainable build, install the npm package (@everflow/everflow-sdk) instead and set the tracking domain yourself with EF.configure({ tracking_domain: '…' }).
  • Load it deferred — create the script element with defer and run your tracking from its onload handler, so it never blocks rendering:
<script type="text/javascript">
  var script = document.createElement('script');
  script.src = "https://www.YOUR-TRACKING-DOMAIN.com/scripts/main.js";
  script.defer = true;
  script.onload = function() {
    EF.click({
      offer_id: EF.urlParameter('oid'),
      affiliate_id: EF.urlParameter('affid')
    });
  };
  document.body.append(script);
</script>
See Tracking Recipes for a full deferred-load example.

Available Modules

Configuration

Set up cross-subdomain tracking and organic fallback attribution.

Click Tracking

Record clicks and generate transaction IDs for attribution.

Click Tracking Recipes

Copy-paste templates for every supported landing page scenario.

Conversion Tracking

Fire conversion events with amounts, event IDs, and custom parameters.

Impression Tracking

Log impression events for CPM-based offers.

Helper Methods

EF.urlParameter(paramName)

Extracts a query string parameter from the current page URL. Returns null if the parameter is not present.
// URL: https://example.com/?oid=5&affid=10
const offerId = EF.urlParameter('oid');       // "5"
const affiliateId = EF.urlParameter('affid'); // "10"

EF.getTransactionId(offerId)

Returns the most recent transaction ID for a given offer. Returns an empty string if no transaction exists.
const txnId = EF.getTransactionId(5);

EF.getAdvertiserTransactionId(advertiserId)

Returns the most recent transaction ID for a given advertiser, regardless of which offer generated it.
const txnId = EF.getAdvertiserTransactionId(2);