My Combo widget is a front-end widget that provides a personalized betting experience and a simplified way to discover and place multi bets. The main feature of the widget is the user interface that allows punters to quickly add multi bet combinations to the bet slip, find new ones or create their own on the fly.
Punters past activity
General betting trends
Overall betting volume
Seasonal variations
New discovery and engagement patterns
info
Personalization requirement
To enable personalized recommendations (the recommended type), you must provide a unique user identifier. When no user ID is provided, the widget will fall back to popular recommendations.
User identifier for personalized combo recommendations.
productTitle
string
undefined
Title text displayed in widget header.
showHeader
boolean
true
Controls visibility of widget header.
showRefreshButton
boolean
false
Extended Properties
Property
Type
Default
Description
buttonIcon
string|false
undefined
Custom icon URL for "Add to Bet Slip" button on combo cards. When provided, displays custom icon alongside button text. When false, hides icon entirely (text-only button). When undefined, uses default plus icon.
filters
object
Required
Configuration object for sport and league filters. See below for detailed structure.
sportsMapping
object
undefined
Maps client's sport identifiers to Sportradar sport IDs. Object with keys as client sport IDs (string/number) and values as Sportradar sport IDs. Example: maps client IDs 101/102 to soccer/basketball. Allows using client's sport taxonomy in filter configurations.
Theming customization allows to tailor the appearance of Bet Recommendation widgets to meet specific needs and preferences. In the context of the Bet Recommendation widget, customization refers to the ability to modify the default styling of the widget by applying custom CSS properties to the various HTML elements that make up the widget.
Widget comes with pre-existing styling but can be customized by applying custom CSS properties to its different HTML elements. The widget's custom class selectors and supported CSS properties are listed below.
All custom classes must be nested within the .sr-bb.sr-br-mycombo selector class. This ensures that the custom styles only apply to that widget and not to other elements on the page.
Mandatory Configuration
The filters property is required for this widget to function correctly. It defines the recommendation logic and basic data constraints.
The onItemClick callback is fired whenever the user interacts with the widget. The first argument is a target string that identifies the interaction type; the second argument is a data object containing contextual information.
target value
Trigger
Key data properties
"externalOutcome"
User clicks a single outcome button
externalEvent, externalMarket, externalOutcome
"externalOutcomes"
User clicks multiple outcomes at once (e.g. combo card)
Array of { externalEvent, externalMarket, externalOutcome }
"externalEvent"
User clicks an event header/card
externalEvent
"externalCompetition"
User clicks a competition/league name
Note: Widgets support callbacks on outcome clicks — the onItemClick handler receives target === "outcome" and a data object containing externalEvent, externalMarket and externalOutcome. Use this for custom outcome callbacks (e.g., add-to-betslip, analytics, modals).
The widget also exposes onTrack for event tracking analytics. See the tracking guide for details.
The onTotalOddsChanged adapter method lets you provide pre-calculated total odds for combo tickets displayed in the widget (used by My Combo and Swipe Bet). When a user's selection changes, the widget calls this method with the current set of outcomes and expects you to return the computed total odds.
Register it alongside your adapter:
javascript
function onTotalOddsChanged(args, callback) { // Replace with your own odds calculation implementation const oddsResponse = getOdds(args); callback(oddsResponse);}SIR("registerAdapter", "{ADAPTER_NAME}", { onTotalOddsChanged: onTotalOddsChanged,}
To keep the widget's selected-outcome state in sync with your own bet slip (i.e. show outcomes as selected when they were added outside the widget), use registerOnBetSlipChange inside registerAdapter.
javascript
// 1. Track your bet slip statelet changeCallback;let betSlipState = { betslip: [], combinedOddsValue: undefined };// 2. Notify the widget whenever the bet slip changesfunction onBetSlipChanged
An adapter is a software component developed by the Sportradar engineering team that bridges the Bet Recommendation widgets and your platform's API. It retrieves data from your API and feeds it to the widget, ensuring seamless communication between the two systems.
Before adapter development begins, confirm and align your API contract with the Sportradar engineering team. Integration requires two SIR calls:
SIR method
Purpose
SIR('registerAdapter', ...)
Configure the adapter that retrieves and displays data from your API.
When maxAllowedOdds is exceeded, the widget trims legs starting from the highest-odds one and recalculates; this repeats until combined odds fall below the limit or the card drops below minTicketLength, in which case the card is discarded.
Setting a high minRequiredLegOdds combined with a low maxTicketLength can result in no cards being returned. Use debug: true to inspect how thresholds are filtering combos.
With editLegAction: "replace", the replacement leg is constrained to the same sport, a similar odds range, and compatibility with the remaining legs.
JavaScript enabled
XMLHttpRequest support for data fetching
CSS3 support for styling and animations
Enables refresh functionality for new combos.
numberOfCards
number
10
Number of combo cards for carousel layout (2-20).
layout
string
Required
Display mode: "single" or "carousel".
editLegAction
string
undefined
Enables leg editing: "replace" or undefined.
betType
string
"mixed"
Combo type: "mixed" (cross-event) or "same" (bet builder).
minTicketLength
number
3
Minimum number of legs per combo (2-12).
maxTicketLength
number
4
Maximum number of legs per combo (2-12).
maxAllowedOdds
number
undefined
Maximum allowed combined odds.
minRequiredLegOdds
number
undefined
Minimum required combined odds.
eventId
string|number
undefined
Event identifier (required when betType: "same").
onItemClick
function
undefined
Callback for combo card interactions.
debug
boolean
false
Enables debug mode with console logging.
{101: 1, 102: 2}
Filters Object
The filters object controls which sports and leagues generate combo recommendations.
Property
Type
Default
Description
sport
object
Required
Sport filter configuration.
sport.available
array<string|number>
[]
Required. Array of Sportradar sport IDs to include in combo generation. Empty array shows all available sports. Example: [1, 2, 5] for soccer, basketball, tennis. AI generates combos using events from specified sports only. See Sports Reference.
league
object
undefined
League/tournament filter configuration.
league.available
array<string|number>
undefined
Array of Sportradar tournament/league IDs to include in combo generation. When provided, AI generates combos using only events from specified leagues. Example: ["sr:tournament:17", "sr:tournament:7"] for Premier League and La Liga. See Getting Identifiers.
Filters Example
javascript
{ sport: { available: [1, 2, 5] // Soccer, Basketball, Tennis }, league: { available: [ "sr:tournament:17", // Premier League "sr:tournament:34", // Bundesliga "sr:tournament:132" // NBA ] }}