Skip to main content
The EF.impression() method records an impression event. Use this for CPM-based offers or when you need to track ad views.

Basic Usage

EF.impression({
  offer_id: 1,
  affiliate_id: 1
});

Parameters

ParameterTypeRequiredDescription
offer_idintegerYesThe offer identifier — can be omitted when coupon_code is supplied
affiliate_idintegerYesThe affiliate identifier
coupon_codestringNoA coupon code — records a coupon-attributed impression (can be sent instead of offer_id)
creative_idintegerNoCreative identifier
sub1sub10stringNoAffiliate sub-placement tracking values
adv1adv10stringNoAdvertiser sub-parameter values
source_idstringNoTraffic source identifier
fbclidstringNoFacebook click ID
gclidstringNoGoogle click ID
tracking_domainstringNoTracking domain override (for multi-tenant setups — see Configuration)
parametersobjectNoFree-form custom key–value parameters

Examples

Basic impression:
EF.impression({
  offer_id: 1,
  affiliate_id: 1
});
With URL parameters:
EF.impression({
  offer_id: EF.urlParameter('oid'),
  affiliate_id: EF.urlParameter('affid')
});
EF.urlParameter() returns an empty string when the parameter is not present in the URL. In that case, nothing is passed for that field — the SDK simply omits it from the impression.
Multi-tenant with specific tracking domain: When multiple Everflow accounts fire impressions on the same page, pass tracking_domain on each call to route it to the correct account — regardless of which account’s SDK script was originally loaded on the page. See Multi-account tracking for the full pattern and caveats.
EF.impression({
  tracking_domain: 'www.tracking-domain-b.com',
  offer_id: 50,
  affiliate_id: 17
});
With custom parameters:
EF.impression({
  offer_id: 1,
  affiliate_id: 1,
  parameters: {
    placement: 'sidebar',
    page_type: 'article'
  }
});
Coupon-level impression: When attribution is driven by a coupon code, pass coupon_code in place of offer_id. A common pattern is to read it from the inbound utm_source:
EF.impression({
  coupon_code: EF.urlParameter('utm_source'),
  source_id: window.location.hostname
});