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
| Parameter | Type | Required | Description |
|---|
offer_id | integer | Yes | The offer identifier |
affiliate_id | integer | Yes | The affiliate identifier |
sub1 – sub5 | string | No | Sub-placement tracking values |
source_id | string | No | Traffic source identifier |
fbclid | string | No | Facebook click ID |
gclid | string | No | Google click ID |
tracking_domain | string | No | Tracking domain override (for multi-tenant setups — see Configuration) |
parameters | object | No | Free-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'
}
});