---
title: "General Statistics"
canonical_url: "https://apidocs.sportradar.com/resources/widgets/docs/widgets/match/general-statistics"
markdown_url: "https://apidocs.sportradar.com/resources/widgets/docs/widgets/match/general-statistics.md"
last_updated: "2026-03-26T13:44:48Z"
---

# General Statistics

**General Statistics** widget displays comprehensive match statistics comparing both teams across multiple categories including possession, shots, passes, fouls, and other sport-specific metrics. The widget presents data using visual bar or bullet charts for easy comparison, organized into logical groups (e.g., Attack, Defense, Discipline), with period filtering to analyze performance across halves, quarters, or the entire match. It supports multiple sports with sport-specific statistics configurations, responsive layouts adapting to various screen sizes, and customizable display options including chart types, layout density, and visible statistics selection.

<figure>

![Default View](https://apidocs.sportradar.com/resources/widgets/static/img/match/general-statistics/default_view_carousel.png)

  <figcaption class="text-muted-foreground text-center text-sm">
    <p>Shows the default view of the General Statistics widget.</p>
  </figcaption>

</figure>

See the [General Statistics widget demo](https://widgets.sir.sportradar.com/widgets-demo#widget:\(name:match.generalStatistics\)).

## API Reference

### Required Parameters

- **widget-name**: `match.generalStatistics`
- **matchId**: The unique identifier for the match is the only required parameter. See [Getting Identifiers](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/getting-identifiers.md)

**Environment Requirements**

## Technical Requirements:

- JavaScript enabled
- XMLHttpRequest support for data fetching
- CSS3 support for styling and animations

**Supported Sports**

The General Statistics widget supports the following sports:

| Sport             | Sport ID |
| ----------------- | -------- |
| Soccer            | 1        |
| Basketball        | 2        |
| Baseball          | 3        |
| Ice Hockey        | 4        |
| Tennis            | 5        |
| Handball          | 6        |
| Rugby             | 12       |
| Football          | 16       |
| Snooker           | 19       |
| Table Tennis      | 20       |
| Darts             | 22       |
| Volleyball        | 23       |
| Futsal            | 29       |
| Badminton         | 31       |
| Beach Volley      | 34       |
| Esport Soccer     | 137      |
| Esport Basketball | 153      |
| Esport Ice Hockey | 195      |

| Property              | Type      | Default                                                     | Description                                                                                                                                                                   |
| --------------------- | --------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `matchId`             | `number`  | **Required**                                                | The unique identifier for the match.<br><br>See [Getting Identifiers](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/getting-identifiers.md)                 |
| `chartType`           | `string`  | `"bar"`                                                     | Visualization style for statistics comparison. <ul><li>`"bar"`: Horizontal bar charts with team colors</li><li>`"bullet"`: Thin bullet-style charts with animations</li></ul> |
| `layout`              | `string`  | `"normal"`                                                  | Layout density and spacing. <ul><li>`"normal"`: Standard spacing for full-featured display</li><li>`"compact"`: Condensed spacing for space-constrained layouts</li></ul>     |
| `disableWidgetHeader` | `boolean` | `false`                                                     | When `true`, hides the match information header (competition, date, status).                                                                                                  |
| `disableMatchHeader`  | `boolean` | `false`                                                     | When `true`, hides the team names/crests header section.                                                                                                                      |
| `disablePeriods`      | `boolean` | `false`                                                     | When `true`, hides the period selector tabs. Shows full match statistics only.                                                                                                |
| `disableCharts`       | `boolean` | `false`                                                     | When `true`, hides all visual charts, displaying only numeric values and labels.                                                                                              |
| `disableGroups`       | `boolean` | `false`                                                     | When `true`, removes category grouping and section headers, showing all statistics in a flat list.                                                                            |
| `visibleStats`        | `array`   | See [Visible stats identifiers](#visible-stats-identifiers) | Array of statistic IDs to display. When set, only specified statistics are shown (if available for selected match).                                                           |

### Visible Stats Identifiers

`visibleStats` property is an array of sport IDs to display. Statistics are ordered as defined in the array. Order is maintained within groups when`disableGroups: false` is used.

```js
[
    'ball_possession',
    'dangerous_attack',
    'attack',
    'ball_safe',
    'dangerous_attack_percentage',
    'attack_percentage',
    'ball_safe_percentage',
    'goal_attempts',
    'shot_on_target',
    'shot_off_target',
    'corner_kick',
    'free_kick',
    'offside',
    'goal_kick',
    'thown_in',
    'yellow_card',
    'yellow_red_card',
    'red_card',
    'player_substitution',
    'save',
    'fouls',
    'injury',
    'free_throws',
    'two_points',
    'three_points',
    'success_attempts',
    'rebounds',
    'biggest_lead',
    'lead_changes',
    'time_spent_in_lead',
    'timeouts',
    'breaks',
    'aces',
    'double_faults',
    'first_serve_points',
    'second_serve_points',
    'first_serve_success',
    'second_serve_success',
    'service_points',
    'receiver_points',
    'games_won',
    'tiebreaks',
    'max_points_in_a_row',
    'max_games_in_a_row',
]
```

## Main Configurable Features

Illustrations of main feature variants with relevant property values below.

**Default View**

Shows the default view of the General Statistics widget.

![Default View](https://apidocs.sportradar.com/resources/widgets/static/img/match/general-statistics/default_view.png)

**Sample Configuration:**

- matchId: `string|number`

See [General Statistics widget demo](https://widgets.sir.sportradar.com/widgets-demo#widget:\(name:match.generalStatistics\))

## Integration Examples

### Property Name Transformations

Properties do not always transfer from the above table directly into integration code. Properties must be transformed differently for each integration method:

#### JavaScript/Programmatic Integration

- Property names remain unchanged in camelCase
- Properties become members of the 4th parameter object in `SIR()` call
- Example: `cardVariant: "compact"`

> **Info**
>
> In javascript integration, the properties go into an object which is passed as the 4th argument of the call ti `SIR()` function. Please see  [Global SIR API](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/SIR.md)

#### HTML/Declarative Integration

- Convert camelCase to lowercase with dashes, e.g. cardVariant becomes card-variant
- Add `data-sr-` prefix
- Example: `cardVariant` → `data-sr-card-variant`
- Example: `filters.sport.hidden` → Complex objects must be passed as JSON strings

> **Info**
>
> In HTML integration, the properties go into the parent HTML object as object properties, prefixed with `data-sr-` as explained above.

> **Only base property support**
>
> This method supports only simple (base) properties and does not support properties that require functions.

> **Info**
>
> In all examples replace `sportradar` in the widgetloader URL path with your clientId.
>
> Example if your clientId is `client1`:
>
> - This URL: `https://widgets.sir.sportradar.com/sportradar/widgetloader`
> - becomes: `https://widgets.sir.sportradar.com/client1/widgetloader`

**Default View**

### JavaScript (Programmatic)

Initialize the widget programmatically using the JavaScript API. The widget renders in the specified container element.

```js
(function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
)})(window,document,"script","https://widgets.sir.sportradar.com/sportradar/widgetloader","SIR", {
    language: 'en'
});

SIR('addWidget', '#sr-widget', 'match.generalStatistics', {
    matchId: 123
});
```

```html
<div id="sr-widget"></div>
```

### HTML (Declarative)

Insert the following HTML code at the target widget location. Complex object properties must be passed as JSON-encoded strings.

```html
<div id="sr-widget"
        data-sr-widget="match.generalStatistics"
        data-sr-match-id="123">
</div>
<script type="application/javascript"
        src="https://widgets.sir.sportradar.com/sportradar/widgetloader"
        async>
</script>
```
