Skip to main content
Logo
Explore APIsContact Us
  • Home
  • Match Preview
  • Tournament Preview
  • Virtual Stadium
  • StatsHub
  1. Engagement Tools
  2. Similar Bets (Bet Slip)

Similar Bets (Bet Slip)

Widgets, Engagement Tools, BET
My ComboSwipe Bet
Last updated 12 days ago
Is this site helpful?
On this page
  • Key Capabilities
  • Settings and Customization
  • Styling Options
  • Requirements
  • Main Configurable Features
  • Filters Object
  • Theming
  • Custom Class Selectors
  • Integration
  • onItemClick
  • Bet Slip Sync
  • Adapter Setup
  • Data Types
  • Tips
  • Dynamic similarEventIds Management

Similar Bets widget (BetSlip Recommendation) is a front-end widget that provides bet recommendations based on existing selection in the bet slip.

  • Punters past activity
  • General betting trends
  • Overall betting volume
  • Seasonal variations
  • New discovery and engagement patterns
info

Similarity requirement This widget requires at least one event ID in the similarEventIds array to generate recommendations. It analyzes these events to find matches with similar characteristics (sport, status, betting patterns).

Recommendation type

  • Similar events: List of events that are similar to the events in the bet slip.

Integration options

  • The widget can be placed next to or inside the bet slip displaying events that are similar to those that have already been added to the bet slip.

#Key Capabilities

Smart Matching

Smart AI-driven recommendations based on the punter's most recent and relevant bet slip activity.

Live & Pre-match

Seamless support for both real-time in-play event suggestions and upcoming pre-match selection boosts.

Native Flow

Deeply integrated user experience that feels like a natural extension of the operator's checkout flow.

Flexible Placement

Designed to sit either next to or directly inside the bet slip, adapting to various sidebar and modal widths.

Responsive Agility

Fully adaptive design that maintains high-density information clarity across desktop and mobile viewports.

Branding Control

Complete creative control over colors, typography, and corner radius to match your platform's design system.

#Settings and Customization

  • Time span: live, upcoming, or both (default)
  • Sport filter: single sport or multiple sports
  • Competition/country filter
  • Events: number of recommendations

#Styling Options

  • Elements (container, cards, buttons): colors and rounded corners
  • Text: font styles and colors

#Requirements

  • Access to the client API

  • Required endpoints: Odds, Match IDs of selections currently in the bet slip

  • Requires an adapter to be registered via SIR('registerAdapter', '{ADAPTER_NAME}'). See the adapter overview: https://apidocs.sportradar.online/resources/widgets/docs/adapter/Overview

  • widget-name: betRecommendation.similarBets

Environment Requirements

Technical Requirements:

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

Supported Sports

  • American Football NFL only (including NCAA)
  • Aussie Rules
  • Badminton
  • Bandy
  • Baseball & MLB
  • Basketball & NBA (including NCAA)
  • Beach soccer
  • Beach Volleyball
  • Cricket
  • Curling
  • Cycling
  • Darts
  • Field Hockey
  • Floorball
  • Futsal
  • Golf
  • Handball
  • Ice Hockey & NHL
  • Pesapallo
  • Rugby (League & Union)
  • Snooker
  • Soccer
  • Squash
  • Table Tennis
  • Tennis
  • Volleyball
  • Waterpolo
  • Winter sports

#Main Configurable Features

See the Similar Bets widget demo. Illustrations of main configurations with relevant property values below.

Default

#Filters Object

The filters object provides optional filtering to refine similar event recommendations. Note: recommendationType is automatically set to "similar" and cannot be changed.

PropertyTypeDefaultDescription
sportobjectundefinedSport filter configuration.
sport.availablearray<string|number>[]Array of Sportradar sport IDs to limit similar event recommendations. Empty array or omitted shows similar events from all sports. Example: [1] restricts to soccer similar events only. Useful when bet slip contains single-sport selections and you want to maintain sport consistency. See Sports Reference.
sport.sportNamesbooleanfalseDisplay mode for sport indicators. When true, shows sport names as text labels. When false, shows sport-specific icons. Typically keep for compact display in bet slip.

#Filters Example

javascript
{
  sport: {
    available: [1, 2],  // Soccer and Basketball only
    sportNames: false
  },
  time: {
    available: ['not_started'],
    active: ['not_started']  // Only upcoming similar events
  },
  country: {
    available: [







#Theming

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-betslip selector class. This ensures that the custom styles only apply to that widget and not to other elements on the page.

#Custom Class Selectors

CSS classSupported CSS properties
srct-br-containerbackground-color, font-family
srct-br-footercolor
srct-br-loadingbackground-color, border-radius
srct-br-contentbackground-color
srct-br-content__titlecolor
srct-br-cardlistgap
srct-br-cardlist__dividerborder-color, border-width
srct-br-card

#Integration

warning

Mandatory Configuration The filters property is required for this widget to function correctly. It defines the recommendation logic and basic data constraints.

warning

Similar Recommendations Requirement When using the similar recommendation type, you must provide the similarEventIds identifier to specify the reference matches. Refer to Getting Identifiers for more details.

Bet Recommendation technical guide

Demo: Open demo

#onItemClick

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 valueTriggerKey data properties
"externalOutcome"User clicks a single outcome buttonexternalEvent, externalMarket, externalOutcome
"externalOutcomes"User clicks multiple outcomes at once (e.g. combo card)Array of { externalEvent, externalMarket, externalOutcome }
"externalEvent"User clicks an event header/cardexternalEvent
"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.

#Bet Slip Sync

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 state
let changeCallback;
let betSlipState = { betslip: [], combinedOddsValue: undefined };

// 2. Notify the widget whenever the bet slip changes
function onBetSlipChanged

























#Adapter Setup

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 methodPurpose
SIR('registerAdapter', ...)Configure the adapter that retrieves and displays data from your API.
SIR('addWidget', ...)Mount the widget on the page.
javascript
(function























#Data Types

The following data types are provided by the adapter and are also available in the onItemClick callback payload.

Event

PropertyTypeRequiredDescription
idstring | numberYesSportradar event ID.
externalIdstring | number—Client-side event ID.
datestringYesFormatted date string displayed in the widget.

#Tips

#Dynamic similarEventIds Management

Re-render the widget whenever the bet slip changes to keep recommendations in sync:

javascript
betSlip.on("selectionAdded", updateSimilarBets);
betSlip.on("selectionRemoved", updateSimilarBets);
betSlip.on("selectionChanged", updateSimilarBets);
betSlip.on("cleared", hideSimilarBets);

function updateSimilarBets() {
  const eventIds = betSlip.








Debounce updates if the bet slip fires multiple events in quick succession:

javascript
let updateTimer;

function debouncedUpdateSimilarBets() {
  clearTimeout(updateTimer);
  updateTimer = setTimeout(() => {
    updateSimilarBets();
  }, 500);
}

betSlip.on("selectionAdded", debouncedUpdateSimilarBets);
betSlip.on("selectionRemoved", debouncedUpdateSimilarBets)

Limit recommendations as the bet slip grows, and hide the widget when it is full:

javascript
function updateSimilarBets() {
  const selections = betSlip.getSelections();
  const eventIds = selections.map((s) => s.eventId);

  if (eventIds.length === 0) {
    hideSimilarBets();
    return;












false
timeobjectundefinedTime/status filter configuration.
time.availablearray<string>[]Array of time filter options. Options: "live" (only live similar events), "not_started" (only upcoming similar events). Example: ["not_started"] shows only upcoming similar events. Useful to match bet slip event timing (if bet slip has only pre-match bets, show only pre-match similar events).
time.activearray<string>[]Initially active time filters. Can select multiple from available array. Example: ["not_started"] starts showing only upcoming events.
countryobjectundefinedCountry/region filter configuration.
country.availablearray<string|number>undefinedArray of country identifiers to limit similar events geographically. Example: ["GB", "DE", "ES"] shows only similar events from UK, Germany, Spain. Useful for geo-compliance or regional betting preferences. See Getting Identifiers.
leagueobjectundefinedLeague/tournament filter configuration.
league.availablearray<string|number>undefinedArray of tournament/league identifiers to limit similar events by competition. Example: ["sr:tournament:17", "sr:tournament:34"] shows only similar events from Premier League and Bundesliga. Useful when bet slip contains events from specific leagues. See Getting Identifiers.
'GB'
,
'DE'
,
'ES'
,
'IT'
]
// European countries
},
league: {
available: [
'sr:tournament:17', // Premier League
'sr:tournament:34', // Bundesliga
]
}
}
background-color, color, border-radius
srct-br-card__dividerborder-color
srct-br-outcomebackground-color, color, border-radius
srct-br-outcome--selectedbackground-color, color, border-radius
srct-br-outcome--disabledbackground-color, color, border-radius
srct-br-outcome__namefont-size, color
srct-br-outcome__valuefont-size, color
srct-br-eventinfofont-size, color
srct-br-eventinfo__infofont-size
srct-br-eventinfo__iconcolor
srct-br-eventinfo__timefont-size, color
srct-br-eventinfo__statusfont-size, color
srct-br-eventinfo__namefont-size, color
srct-br-scoreboardfont-size, color
srct-br-scoreboard__teamsfont-size, color
srct-br-scoreboard__scoresfont-size, color
srct-br-scoreboard__score-1font-size, color
srct-br-scoreboard__score-2font-size, color

Basic bet slip sidebar integration using current event IDs from the user's bet slip.

JavaScript

javascript
const betSlipEventIds = betSlip.getEventIds();

SIR("addWidget", "#bet-slip-recommendations", "betRecommendation.similarBets", {
  similarEventIds: betSlipEventIds,
  count: 3,
});

HTML (data attributes)

html
<div
  class="sr-widget"
  data-sr-widget="betRecommendation.similarBets"
  data-similar-event-ids="[12345, 67890, 11111]"
  data-count="3"
></div>
externalCompetition
"goToBetSlip"User clicks the "Go to Bet Slip" button (swipeBet only)—
"betSlipMode"Bet slip mode changes between single and multi (swipeBet only)value: "single" | "multi"
javascript
SIR("addWidget", "#sr-widget", "betRecommendation.markets", {
  onItemClick: function (target, data) {
    if (target === "externalOutcome") {
      // Add single outcome to bet slip
      const { externalEvent, externalMarket, externalOutcome } = data;
      betSlip.add({
        eventId: externalEvent.id,
        marketId: externalMarket.id,
        outcomeId: externalOutcome.id,
      });
    } else if (target === "externalEvent") {
      // Navigate to event/match detail page
      window.location.href = `/matches/${data.externalEvent.id}`;
    } else if (target === "externalCompetition") {
      // Navigate to competition/league page
      window.location.href = `/league/${data.externalCompetition.tournament.id}`;
    }
  },
  filters: { recommendationType: { available: "popular" } },
});
(
callback
)
{
changeCallback = callback;
changeCallback && changeCallback(betSlipState); // push current state immediately
}
// 3. Handle outcome clicks from the widget
function onItemClick(target, data) {
if (target === "externalOutcome") {
const newBet = {
externalEventId: data.externalEvent.id,
externalMarketId: data.externalMarket.id,
externalOutcomeId: data.externalOutcome.id,
externalSpecifierId: data.externalMarket.specifier
? data.externalMarket.specifier.value
: undefined,
};
betSlipState = {
betslip: [...betSlipState.betslip, newBet],
combinedOddsValue: "14.52", // replace with your own calculation
};
changeCallback && changeCallback(betSlipState);
}
}
// 4. Register adapter with bet slip sync + add the widget
SIR("registerAdapter", "{ADAPTER_NAME}", { onBetSlipChanged });
SIR("addWidget", "#sr-widget", "betRecommendation.markets", { onItemClick });

Until a custom adapter is developed, use the mockData adapter for local testing:

javascript
SIR("registerAdapter", "mockData", { onBetSlipChanged });
(
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("registerAdapter", "{ADAPTER_NAME}");
SIR("addWidget", "#sr-widget", "betRecommendation.markets");
sport.idstring | numberYesSport ID. Use sportsMapping if not using Sportradar sport IDs.
sport.namestringYesSport name.
category.idstring | number—Category ID.
category.namestringYesCategory name (e.g. "England").
tournament.idstring | number—Tournament/league ID.
tournament.namestringYesTournament name.
teamsArray<{id, name}>YesHome and away competitors.
isLivebooleanYesWhether the event is currently live.
liveCurrentTimestringYesLive time display (e.g. "2nd set", "45'").
result1 / result2 / result3result—Score columns: { result: [homeScore, awayScore] }.

Market

PropertyTypeRequiredDescription
idstring | numberYesMarket ID.
namestring—Market name (e.g. "Match Winner").
status.isActiveboolean—When false, see Widget Behavior.

Outcome

PropertyTypeRequiredDescription
idstring | numberYesOutcome ID.
namestringYesOutcome name (e.g. "Home", "Draw").
oddsstring | numberYesOdds value. Use a number type to enable odds-change indicators (up/down arrows).
specifier.valuestring | number—Additional specifier (e.g. handicap value "-2.50").
status.isActiveboolean—When false, see Widget Behavior.
getEventIds
()
;
if (eventIds.length === 0) {
hideSimilarBets();
return;
}
SIR("addWidget", "#similar-bets", "betRecommendation.similarBets", {
similarEventIds: eventIds,
count: 3,
});
}
;
}
if (eventIds.length >= 5) {
hideSimilarBets();
return;
}
const recommendationCount = Math.min(3, 5 - eventIds.length);
SIR("addWidget", "#similar-bets", "betRecommendation.similarBets", {
similarEventIds: eventIds,
count: recommendationCount,
});
}