> ## Documentation Index
> Fetch the complete documentation index at: https://developers.everflow.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Impression Tracking

> Log impression events using the Everflow JavaScript SDK.

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

## Basic Usage

```javascript theme={null}
EF.impression({
  offer_id: 1,
  affiliate_id: 1
});
```

## Parameters

| Parameter         | Type    | Required | Description                                                                                                                         |
| ----------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `offer_id`        | integer | Yes      | The offer identifier — can be omitted when `coupon_code` is supplied                                                                |
| `affiliate_id`    | integer | Yes      | The affiliate identifier                                                                                                            |
| `coupon_code`     | string  | No       | A coupon code — records a coupon-attributed impression (can be sent instead of `offer_id`)                                          |
| `creative_id`     | integer | No       | Creative identifier                                                                                                                 |
| `sub1` – `sub10`  | string  | No       | Affiliate sub-placement tracking values                                                                                             |
| `adv1` – `adv10`  | string  | No       | Advertiser sub-parameter 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](/sdk/configuration#multi-account-tracking-tracking_domain)) |
| `parameters`      | object  | No       | Free-form custom key–value parameters                                                                                               |

## Examples

**Basic impression:**

```javascript theme={null}
EF.impression({
  offer_id: 1,
  affiliate_id: 1
});
```

**With URL parameters:**

```javascript theme={null}
EF.impression({
  offer_id: EF.urlParameter('oid'),
  affiliate_id: EF.urlParameter('affid')
});
```

<Note>
  `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.
</Note>

**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](/sdk/configuration#multi-account-tracking-tracking_domain) for the full pattern and caveats.

```javascript theme={null}
EF.impression({
  tracking_domain: 'www.tracking-domain-b.com',
  offer_id: 50,
  affiliate_id: 17
});
```

**With custom parameters:**

```javascript theme={null}
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`:

```javascript theme={null}
EF.impression({
  coupon_code: EF.urlParameter('utm_source'),
  source_id: window.location.hostname
});
```
