# links_visits_history (timeseries)

| Required permit | Rate limit tokens cost | Available intervals |
| --- | --- | --- |
| Reporting:Api:Report:LinksVisitsHistory | 3 | 5m, 1h, 1d, 1w, 1mo |

This report allows you to get information about resolved links.

## Fields

### loyalty_club_id

| Type | Filterable |
| --- | --- |
| Integer | <Icon icon="material-outline-done"/> (via `X-Customer` header) |

ID of loyalty club.

### source_type

| Type | Filterable |
| --- | --- |
| Enum | <Icon icon="material-outline-done"/> |

Type of system component from which link visit was generated.

This field is an enum, possible values are:

* landing_page
* website
* tracker_sending
* tracker_api

### source_id

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-done"/> |

Identifier set by component from which link was generated.

### host

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-highlight_off"/> |

Host of tracked URL.

### path

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-highlight_off"/>

Path of tracked URL.

### device_type

| Type | Filterable |
| --- | --- |
| Enum | <Icon icon="material-outline-done"/> |

Device used to visit the link.

This field is an enum, possible values are:
* mobile
* desktop
* tablet
* bot

### ip_country

| Type | Filterable |
| --- | --- |
| String(`ISO 3166-1 alpha-2`) | <Icon icon="material-outline-highlight_off"/> |

Country of IP address.

### ip_subdivision

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-highlight_off"/> |

Subdivision of IP address.

Examples:
* USA states codes: `CA`, `MI`, `DC`, etc.

### user_agent_name

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-highlight_off"/> |

Short identifier of user agent.

Examples:
* `Safari`
* `Chrome`
* `iPhone`
* `Googlebot`

## Query without aggregations

Query returns series with numbers of links visits.

```json
{
    "interval": "1d",
    "range_timezone": "Europe/Oslo",
    "time_buckets": [
        "2025-08-29T00:00:00.000+02:00"
    ],
    "series": [
        {
            "label": {},
            "values": [
                1148
            ]
        }
    ],
    "data_points": 1,
    "result_type": "timeseries"
}
```

## Aggregations

### device_type

Fetch visits data aggregated by device_type.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| device_type | Enum | See in `Fields` |

#### Example query response

```json
{
    "interval": "1d",
    "range_timezone": "Europe/Oslo",
    "time_buckets": [
        "2025-08-29T00:00:00.000+02:00"
    ],
    "series": [
        {
            "label": {
                "device_type": "mobile"
            },
            "values": [
                885
            ]
        },
        {
            "label": {
                "device_type": "tablet"
            },
            "values": [
                2
            ]
        },
        {
            "label": {
                "device_type": "desktop"
            },
            "values": [
                3
            ]
        },
        {
            "label": {
                "device_type": "bot"
            },
            "values": [
                16
            ]
        },
        {
            "label": {
                "device_type": null
            },
            "values": [
                240
            ]
        }
    ],
    "data_points": 5,
    "result_type": "timeseries"
}
```

### ip_country

Fetch visits data aggregated by IP country.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| ip_country(`ISO 3166-1 alpha-2`) | String | See in `Fields` |

#### Example query response

```json
{
    "interval": "1d",
    "range_timezone": "Europe/Oslo",
    "time_buckets": [
        "2025-08-29T00:00:00.000+02:00"
    ],
    "series": [
        {
            "label": {
                "ip_country": "NO"
            },
            "values": [
                885
            ]
        },
        {
            "label": {
                "ip_country": "PL"
            },
            "values": [
                2
            ]
        },
        {
            "label": {
                "ip_country": null
            },
            "values": [
                3
            ]
        }
    ],
    "data_points": 3,
    "result_type": "timeseries"
}
```