Skip to main content
Use EF.configure() to customize SDK behavior before calling any tracking methods. This is required when you need cross-subdomain cookie attribution or organic fallback tracking.
EF.configure({
  tld: "your-store.com",
  organic: {
    offer_id: 1,
    affiliate_id: 1
  }
});
Call EF.configure() before any EF.click(), EF.conversion(), or EF.impression() calls.

Cross-subdomain tracking (tld)

By default, the SDK stores first-party cookies on the current subdomain. If a user clicks on shop.your-store.com but converts on checkout.your-store.com, the SDK cannot read the cookie across subdomains. Set the tld option to store cookies at the top-level domain so all subdomains can access them:
EF.configure({ tld: "your-store.com" });
This ensures that a click recorded on any subdomain (e.g., shop.your-store.com, www.your-store.com) is accessible when the conversion fires on a different subdomain (e.g., checkout.your-store.com).
Always use the fully qualified subdomain when loading pages. Use www.your-store.com instead of your-store.com to avoid cookie scoping issues.

Example

<!-- On shop.your-store.com -->
<script src="https://www.your-tracking-domain.com/scripts/main.js"></script>
<script>
  EF.configure({ tld: "your-store.com" });

  // Click is recorded and cookie is stored at .your-store.com
  EF.click({
    offer_id: EF.urlParameter('oid'),
    affiliate_id: EF.urlParameter('affid')
  });
</script>
<!-- On checkout.your-store.com -->
<script src="https://www.your-tracking-domain.com/scripts/main.js"></script>
<script>
  EF.configure({ tld: "your-store.com" });

  // Conversion reads the cookie from .your-store.com
  EF.conversion({
    offer_id: 5,
    amount: 49.99
  });
</script>

Organic tracking

If your tracking URLs don’t always include offer_id and affiliate_id parameters, you can set fallback defaults using the organic option. When a user lands on your page without the expected URL parameters, the SDK uses these defaults instead of abandoning the tracking event.
EF.configure({
  organic: {
    offer_id: 1,
    affiliate_id: 1
  }
});

How it works

  1. User visits your-store.com/?oid=5&affid=10 — SDK uses offer_id: 5, affiliate_id: 10 from the URL
  2. User visits your-store.com/ (no parameters) — SDK falls back to offer_id: 1, affiliate_id: 1 from the organic config
This is useful for:
  • Landing pages that may receive both paid and organic traffic
  • Pages where tracking parameters are sometimes stripped by redirects or intermediaries
  • Ensuring conversions are never lost due to missing URL parameters

Example

<script src="https://www.your-tracking-domain.com/scripts/main.js"></script>
<script>
  EF.configure({
    organic: {
      offer_id: 1,
      affiliate_id: 1
    }
  });

  // Uses URL params if present, otherwise falls back to organic defaults
  EF.click({
    offer_id: EF.urlParameter('oid'),
    affiliate_id: EF.urlParameter('affid')
  });
</script>

Multi-account tracking (tracking_domain)

If you work with multiple Everflow accounts, you can specify the tracking_domain directly on individual tracking calls to route events to the correct account:
EF.click({
  offer_id: 5,
  affiliate_id: 10,
  tracking_domain: "www.other-tracking-domain.com"
});
This overrides the default tracking domain set by the SDK script tag. You can use this on EF.click(), EF.conversion(), and EF.impression() calls.

Combining options

All configuration options can be combined:
EF.configure({
  tld: "your-store.com",
  organic: {
    offer_id: 1,
    affiliate_id: 1
  }
});

Options reference

OptionTypeDescription
tldstringTop-level domain for cookie storage. Enables cross-subdomain attribution.
organic.offer_idnumberFallback offer ID when URL parameters are missing.
organic.affiliate_idnumberFallback affiliate ID when URL parameters are missing.