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

# Website analytics and tracking

> Install the cookieless tracking snippet, see who visits your site and where they came from, watch live traffic, build custom reports and track custom events.

InstantCampaign can measure visits to your own website and your hosted landing pages, attribute them to channels and campaigns, and connect them to known contacts. It does this **without cookies**.

## Install tracking on your website

<Steps>
  <Step title="Create a tracking token">
    Go to **Settings → Tracking Tokens** and click **New Token**. Give it a **Label** that identifies the site or environment, such as "Production website". Use one token per website or environment.
  </Step>

  <Step title="Copy the snippet">
    The token is shown **once**. Copy it now. The dialog also shows the embed snippet:

    ```html theme={null}
    <script src="https://instantcampaign.ai/track.js"
      data-site-id="ict_…"></script>
    ```
  </Step>

  <Step title="Add it to every page">
    Paste the snippet into your site's `<head>`, or into your site builder's "custom code" setting. Single-page apps are handled: route changes count as pageviews.
  </Step>

  <Step title="Restrict it to your domains (recommended)">
    Back on **Tracking Tokens**, open **Manage allowed domains** for the token and add your site's hostnames, such as `example.com`. Up to 20 domains per token. With no domains, all origins are allowed.
  </Step>
</Steps>

**Hosted landing pages** track themselves. There's nothing to paste. To stop collecting on them, turn off **Track landing pages** under **Settings → General**.

### The JavaScript API

The snippet also exposes `ICTrack` for custom tracking:

```js theme={null}
ICTrack.event("purchase", { amount: 99, plan: "pro" });   // a custom event
ICTrack.goal("purchase", { value: 99, currency: "USD", externalId: "order-1" }); // a conversion goal
ICTrack.identify("user@example.com");                     // tie this visitor to a contact
ICTrack.page({ section: "pricing" });                     // a pageview with extra properties
```

`identify` links the current visit, and that visitor's other visits the same day, to the contact with that email address.

### Identifying visitors from your emails

When a campaign links to a site listed in a tracking token's **Allowed Domains**, InstantCampaign adds a signed visitor id to that link. A recipient who clicks through is then recognized as that contact on your site. Links to other domains are left untouched, so the id never reaches third parties.

## Privacy

* **No cookies and no browser storage.** A visitor is a server-side fingerprint of your workspace, the IP address and the browser, which **changes every day at midnight UTC**. The raw IP address is never stored.
* **Country comes from the browser's time zone**, not IP geolocation. That's why there are no city-level reports.
* **Do Not Track is honored.** Browsers that send it aren't tracked.
* Referrer query strings are dropped. Crawlers and bots are ignored.
* Visits are kept for about 13 months.

Because nothing is stored on the visitor's device, the tracker doesn't need a cookie-consent prompt. If your site has its own consent banner for other cookies, keep using it. The pages we host for you set no cookies.

## Website Traffic

**Analytics → Website Traffic** shows, for the selected period:

* **Visitors**, **Sessions**, **Pageviews**, **Time on page** (time the page was actually visible) and **Bounce rate**, each compared with the previous period, plus how many visitors were **Identified** (known contacts).
* **Traffic over time**, switchable **Daily** / **Weekly** / **Monthly**, with the same campaign and journey markers as the email charts.
* Tabbed breakdown cards:
  * **Top pages**: **Pages**, **Landing pages** and **Exits**
  * **Top sources**: **Referrers**, **Sources**, **Channels** and **Channel groups**
  * **Top campaigns**: `utm_campaign`, **Mediums**, **Contents** and **Terms**
  * **Devices**: **Devices**, **Browsers** and **OS**
  * **Countries**: a **Map** or **List** view
* **Traffic by day and hour**: a heatmap in your workspace timezone.

Click any row to filter the whole dashboard by it. Tick **Identified visitors only** to see only known contacts.

**Definitions.** A *session* continues while there's activity within 30 minutes. A *bounce* is a one-page session with less than 10 seconds of visible time.

## Live

**Analytics → Live** (or the "online now" badge) shows who's on the site in the last 1, 5 or 30 minutes, refreshed every 10 seconds: current pages, where visitors came from, channels, campaigns, devices, countries, and an activity list of the most recently active visitors. Visitors are anonymous until they're identified as a **Known contact**. On very busy sites, counts cover the most recent 1,000 sessions.

## Explore

**Analytics → Explore** is for custom reports. Pick a preset from **All reports**, or click **Create my own** and **Group by** up to 4 dimensions. The table shows sessions, visitors, pageviews, average engaged time and bounce rate. Use **Having at least** to hide rows with few sessions. The report lives in the URL, so copy the link to share it. **Export CSV** downloads the table.

## Website Events

**Analytics → Website Events** lists custom events sent with `ICTrack.event()`: **Event Name**, **Contact** (or **Anonymous**), **Properties**, **Source** and **Time**. Filter by event name.

## Channels and attribution

Each visit is assigned a channel: direct, search, social, email, paid, AI assistant or referral. The channel comes from UTM tags first, then ad click ids (such as `gclid` or `fbclid`), then the referrer. To change how visits are classified, see [Attribution rules](/guides/sending-and-workspace/attribution-rules).

## Troubleshooting

<AccordionGroup>
  <Accordion title="No visits recorded yet">
    Make sure the snippet is on the page and uses your full token. Check that the site's hostname is in the token's **Allowed Domains**, or that the list is empty. Also make sure you're not testing in a browser with Do Not Track turned on.
  </Accordion>

  <Accordion title="I lost my token">
    Tokens are only shown once. Create a new token, update the snippet, then revoke the old one.
  </Accordion>

  <Accordion title="Email clicks aren't identifying visitors">
    The link's domain must be listed in a tracking token's **Allowed Domains**. A token with no allowed domains doesn't add the id to any link. The tracking snippet must also be installed on the page the link opens.
  </Accordion>
</AccordionGroup>
