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

# Track impressions on your links

Source: https://docs.linkrunner.io/features/track-impressions

Credit installs to a banner or ad view, even when nobody taps, by giving your publisher an impression URL for a normal Linkrunner link.

Say a publisher shows your banner inside their app. Some people see it, don't tap it, and install your app later from the store. Without impression data, those installs look organic.

With **Track impressions** on, Linkrunner gives you an **Impression URL** for the link. Your publisher calls it from their server each time the banner is shown. If the same phone installs your app within 24 hours (by default), Linkrunner credits the install to your link. This is **view-through attribution**.

**Next action:** turn on **Track impressions** for the link, then [send the URL to your publisher](https://docs.linkrunner.io/features/track-impressions#send-this-to-the-publisher).

> **Note:**
>
> This is for normal Linkrunner links, where the Ad Channel is empty or a custom channel. Links for Meta, Google, TikTok, Snapchat, Apple Search Ads and affiliate partners can't turn it on. Affiliate partners report impressions with their own token. See [S2S impressions](https://docs.linkrunner.io/affiliate-partners/s2s-impressions).

## Turn it on

**1. Open the link form**

Create a link as described in [Create a trackable link](https://docs.linkrunner.io/features/create-trackable-link), or open an existing link and click **Edit**.

**2. Turn on Track impressions**

Open **Advanced Options** and turn on **Track impressions**.

![Create Campaign form with Track impressions turned on under Advanced Options](https://docs.linkrunner.io/images/impression-links/01-create-switch.webp)

**3. Copy the Impression URL**

Click **Create Campaign**. The **Impression URL** appears under the campaign link, with a copy button.

![Success screen showing the campaign link and the Impression URL](https://docs.linkrunner.io/images/impression-links/02-success-impression-url.webp)

You can copy it again later. Open the link in **App Campaigns** and look under the campaign link.

![Campaign drawer with the Impression URL under the campaign link](https://docs.linkrunner.io/images/impression-links/03-drawer-impression-url.webp)

Turning the switch on also sets up your project's view-through window for your own links at 24 hours, if it isn't set already. You can change it in **Settings → Attribution Windows**. See [Attribution windows](https://docs.linkrunner.io/features/attribution-windows).

## The Impression URL

```text wrap
https://s2s.linkrunner.io/v1/impression?d=<your link domain>&c=<link code>&tid={impression_id}&gaid={gaid}&idfa={idfa}
```

| Part | What it is |
| --- | --- |
| `d` | Your link domain. Already filled in. |
| `c` | The link code. Already filled in. |
| `tid` | A unique ID for each view. Replace `{impression_id}` with it. Retries with the same ID count once. |
| `gaid` | The Android advertising ID of the phone. Replace `{gaid}`. |
| `idfa` | The iOS advertising ID of the phone. Replace `{idfa}`. |

An impression with no device ID is rejected, because Linkrunner matches the view to the install by that ID.

Optional parameters:

| Parameter | Use it to |
| --- | --- |
| `impression_time` | Send the time of the view in Unix milliseconds. Use it if you batch calls. |
| `vt_lookback` | Shorten the view-through window for one impression, for example `12h`. `af_viewthrough_lookback` also works. The longest window is 24 hours. |

No partner token or affiliate account is needed.

Share the Impression URL only with the publisher running the ad. Like an AppsFlyer or DCM impression link, it works without a password, so anyone who has it can report views. Turn **Track impressions** off on the link when the campaign ends.

## Send this to the publisher

Copy this message and replace the URL with your own Impression URL.

```text
Please call this URL from your server each time our banner is shown to a user:

https://s2s.linkrunner.io/v1/impression?d=<your link domain>&c=<link code>&tid={impression_id}&gaid={gaid}&idfa={idfa}

- Replace {impression_id} with a unique ID for each view. Retries with the same ID are counted once.
- Replace {gaid} (Android) or {idfa} (iOS) with the phone's advertising ID. Calls without one are rejected.
- Call it when the banner is shown, in real time. Please don't send views that are more than 24 hours old.
- If you batch calls, add impression_time (Unix milliseconds).
- Keep our normal campaign link on the banner, so taps are tracked as clicks.
```

Your publisher should also put the normal campaign link on the banner. Taps use that link.

## How installs are credited

- **Same device.** The install must come from the phone whose advertising ID was in the impression.
- **Inside the window.** The install happens within 24 hours of the view, or within the shorter `vt_lookback` the publisher sent.
- **Clicks win.** If the user also clicked a link that can be credited, the click gets the install, not the view.

## See the results

Impressions and view-through installs for the link show on the Campaigns page. See [What the Campaigns columns mean](https://docs.linkrunner.io/features/campaign-metrics).

## Responses

| Response | Meaning | What to do |
| --- | --- | --- |
| `200` with `{"status":"accepted","impression_id":...}` | The impression is recorded. | Nothing. |
| `403` `impression_tracking_not_enabled` | **Track impressions** is off for this link. | Turn it on in the link's settings. |
| `400` | The device ID is missing, or the domain or link code is unknown. | Fix the request. Don't retry it as it is. |
| `503` | Linkrunner can't take the call right now. | Retry later. |

## Use the API

The create and edit campaign APIs accept `impression_tracking_enabled`. Send `true` to turn it on, or `false` to turn it off. Leave it out on an edit to keep the current setting. See [Campaign APIs](https://docs.linkrunner.io/api-reference/campaign-apis).

```json
{
    "name": "Home banner",
    "impression_tracking_enabled": true
}
```

**Need help?** Contact [support@linkrunner.io](mailto:support@linkrunner.io)
