---
title: "Widget Correlations"
canonical_url: "https://apidocs.sportradar.com/resources/widgets/docs/tutorials/examples/correlations"
markdown_url: "https://apidocs.sportradar.com/resources/widgets/docs/tutorials/examples/correlations.md"
last_updated: "2026-03-23T13:02:35Z"
---

# Widget Correlations

Correlation examples demonstrate how widgets can communicate with each other by passing properties on user interactions. This enables you to create connected widget experiences where clicking an element in one widget updates another.

## The onItemClick Callback

All correlation examples use the universal click callback function `onItemClick`, which receives two arguments:

| Parameter | Type     | Description                                                                                                                     |
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `type`    | `string` | Type of clicked element: `'match'`, `'player'`, `'team'`, `'season'`, `'realCategory'`, `'tournament'`, or `'uniqueTournament'` |
| `obj`     | `object` | Data object specific to the widget and element type. Properties vary by widget.                                                 |

> **Tip**
>
> Use the code example below to inspect available properties for any widget by replacing `'player.selector'` with your target widget name.

**View Inspection Code Example**

```html
<div class="container"></div>
<script>
(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'
});

alert('Click on any player to get correlation info.');
SIR('addWidget', '.container', 'player.selector', {
    onItemClick: function(type, obj) {
        alert('Clicked item type:\n"' + type + '"\n\nObject:\n' + JSON.stringify(obj, null, '\t'));
    }
});
</script>
```

> **Note**
>
> Correlation examples work best with Chrome and Firefox browsers.

***

## Correlation Examples

### Match Correlation

![Match Correlation](https://apidocs.sportradar.com/resources/widgets/static/img/match.correlation.example.png)

**How It Works:**

| Input Widget      | Output Widget | Shared Properties |
| ----------------- | ------------- | ----------------- |
| `match.matchlist` | LMT demo page | • `matchId`       |

> **Tip**
>
> For the best presentation, choose a live match when testing this correlation.

### Player Correlation

![Player Correlation](https://apidocs.sportradar.com/resources/widgets/static/img/player.correlation.example.png)

**How It Works:**

| Input Widget      | Output Widget | Shared Properties                                    |
| ----------------- | ------------- | ---------------------------------------------------- |
| `player.selector` | `player.info` | • `playerId`<br>• `teamId`<br>• `uniqueTournamentId` |

### Soccer Team Correlation

![Soccer Team Correlation](https://apidocs.sportradar.com/resources/widgets/static/img/soccerteam.correlation.example.png)

**How It Works:**

| Input Widget    | Output Widget | Shared Properties                                     |
| --------------- | ------------- | ----------------------------------------------------- |
| `team.selector` | `team.info`   | • `seasonId`<br>• `uniqueTournamentId`<br>• `teamUid` |

### Multi-Level Correlation (Team → Player)

![Multi Level Correlation](https://apidocs.sportradar.com/resources/widgets/static/img/playerteam.correlation.example.png)

**How It Works:**

| Input Widget       | Output Widget      | Shared Properties                                                    |
| ------------------ | ------------------ | -------------------------------------------------------------------- |
| `season.liveTable` | `team.leaderboard` | • `matchId`<br>• `seasonId`<br>• `uniqueTournamentId`<br>• `teamUid` |
| `team.leaderboard` | `player.info`      | • `playerId`<br>• `teamUid`<br>• `uniqueTournamentId`                |

> **Info**
>
> This example demonstrates multi-level widget correlations where one interaction triggers a chain of updates.

### Basketball Team Correlation

![Basketball Correlation](https://apidocs.sportradar.com/resources/widgets/static/img/basketballteam.correlation.example.png)

**How It Works:**

| Input Widget       | Output Widget          | Shared Properties           |
| ------------------ | ---------------------- | --------------------------- |
| `season.liveTable` | `team.basketball.info` | • `seasonId`<br>• `teamUid` |

***

## Additional Resources

For more information about widget integration and advanced features:

<!-- TODO: Fix links wjhen adapter docs are ready-->

- [Common Adapter Types](https://apidocs.sportradar.com/resources/widgets/adapter/Types.md) - Shared type definitions and interfaces
