Skip to main content
Logo
Explore APIsContact Us
  • Home
  • Match Preview
  • Tournament Preview
  • Virtual Stadium
  1. Resources
  2. Widgets
  3. Highlights

Highlights

Widgets, Engagement Tools
Event ListLeagues
Last updated 16 days ago
Is this site helpful?
On this page
  • Key Capabilities
  • Placement Options
  • Settings and Customization
  • Styling Options
  • Requirements
  • Main Configurable Features
  • API Reference
  • Basic Properties
  • Theming
  • Custom Class Selectors
  • Integration
  • Widget Setup
  • onItemClick
  • Bet Slip Sync
  • Adapter Setup
  • Data Types
  • Tips

Highlights widget (Bet Recommendation) is a front-end widget that provides a personalized betting experience. It displays a list of events based on event popularity and the punters betting history via a user friendly interface. It simplifies the process of finding the right bet from the myriad of possible choices and boosts betting volume for upcoming and live events.

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

Recommendation types

  • Recommended: Personalized list of recommendations based on punters betting history and preferences. Requires the user to be logged in.
  • Popular: List of the most popular items based on the total number of bets placed (no login required).
  • Trending: List of the currently trending items based on the number of recently placed bets (no login required).
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.

#Key Capabilities

Personal Touch

Smart AI-driven event recommendations tailored to each individual punter's unique betting history.

Live & Pre-match

Full support for real-time in-play event highlights and upcoming pre-match betting opportunities.

Discovery Engine

Simplifies the selection process by surfacing the most relevant bets from thousands of available options.

Volume Growth

Strategically designed to boost betting turnover for both upcoming matches and live events.

Painless Setup

Rapid client-side integration with minimal development resources required for a full deployment.

Flexible Styling

Complete creative freedom to customize colors, shapes, and typography to fit your brand identity.

#Placement Options

Homepage Grid

Engaging horizontal or vertical carousel of events that serves as the perfect entry point.

Sidebar Stacks

Optimized vertical layouts for sidebar placement, keeping users engaged across every page.

Full-Screen Focus

Expansive grid support for high-density, multi-row event showcases on desktop landing pages.

Mobile First

Native-feeling scrolling and swiping interactions built specifically for the mobile-betting generation.

#Settings and Customization

  • Recommendation type: recommended, popular, or trending
  • Time span: live, upcoming, or both (default)
  • Sport filter: single sport or multiple sports
  • Competition/country filter

#Styling Options

  • Elements (container, cards, buttons): colors and rounded corners
  • Text: font styles and colors
  • Recommendation selector: enable/disable or show only one recommendation type
  • Sports selector: enable/disable (all sports selected if disabled)
  • Events: number of rows (1-3, default 1)

#Requirements

  • Access to the client API

  • Required endpoints: User ID, Odds (WIP)

  • 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

Environment Requirements

Supported Browsers

BrowserVersionMobile Support
Chrome60+✅ Chrome Mobile 60+
Firefox55+✅ Firefox Mobile 55+
Safari12+✅ iOS Safari 12+
Edge79+✅ Edge Mobile 79+
Internet ExplorerAll versions❌ Not Supported

Technical Requirements:

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

Illustrations of main layout variants and card types with relevant property values below. See the Highlights widget demo.

Default

#API Reference

#Basic Properties

PropertyTypeDefaultDescription
userstring|number0User identifier for personalized recommendations.
countnumber24Number of event cards to display (1-48).
cardsLayoutstring"horizontal"Layout direction: "horizontal" (grid) or "vertical" (single column).
categoryLayoutstring

Extended Properties

PropertyTypeDefaultDescription
filtersobjectRequiredConfiguration for all filter types including recommendation type, sports, time, country, and leagues. See below for detailed structure.
maxRowsnumber1Maximum number of card rows to display. Determines vertical height of widget. Combined with responsive cards-per-row calculation, this controls total visible cards. Example: 3 rows × 4 cards/row = 12 visible cards. Range: 1-3 rows.
sportsMappingobjectundefinedMaps 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 sport 101 to soccer, 102 to basketball. Allows using client's sport taxonomy in filter configurations.

#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-betRecommendation 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-headerbackground-color, color
srct-br-header__dividerborder-color
srct-br-footercolor
srct-br-loadingbackground-color, border-radius
srct-br-navigationbackground-color, color
srct-br-sportsfilterbackground-color, color

#Integration

warning

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

Bet Recommendation technical guide

Demo: Open demo

#Widget Setup

#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

  • With cardsLayout: "horizontal", visible cards = cards per row × maxRows. Cards per row varies by container width: 1 (< 400px), 2 (400–660px), 3 (660–970px), 4 (970px+).
  • JavaScript enabled
  • XMLHttpRequest support for data fetching
  • CSS3 support for styling and animations
"tabs"
Display mode: "tabs" (one category at a time) or "expanded" (all categories).
cardVariantstring"default"Card style: "default", "compact", or "table".
outcomeNamePositionstring"start"Position of outcome label: "start", "end", "top", or "bottom".
onItemClickfunctionundefinedCallback for user clicks on events or outcomes.
{101: 1, 102: 2}
similarEventIdsarray<number>undefinedArray of event IDs for "similar" recommendation type. Required when filters.recommendationType.available includes "similar" and active: "similar". AI finds events similar to specified reference events based on sport, league, teams, odds patterns, and market characteristics. Example: [12345, 67890] finds events similar to these two matches.
debugbooleanfalseEnables debug mode with console logging for development. When true, logs recommendation generation, API calls, event filtering, card rendering, interaction tracking, errors with stack traces. Use for troubleshooting integration issues and understanding recommendation logic.
stylingobjectundefinedCustom styling configuration for layout adjustments.
styling.disablePaddingTopbooleanfalseRemoves top padding from widget container. Use when widget follows other content without spacing gap.
styling.disablePaddingBottombooleanfalseRemoves bottom padding from widget container. Use when widget precedes other content without spacing gap.

Filters Object

The filters object controls recommendation algorithms, time windows, sports, geographic regions, and league filtering.

PropertyTypeDefaultDescription
recommendationTypeobjectRequiredRecommendation algorithm configuration controlling which recommendation types display and initial active type.
recommendationType.availablearray<string>["recommended", "popular", "trending", "similar"]Required. Array of recommendation types to enable. Order determines tab sequence (when categoryLayout: "tabs") or section order (when categoryLayout: "expanded"). Options:
  • "recommended": AI-powered personalized recommendations based on user betting history (requires user parameter). Analyzes user's favorite sports, preferred odds ranges, typical bet types, bet timing, win rates, and engagement patterns.
  • "popular": Most popular events across all users. Shows events with highest betting volume, number of unique bettors, and consistent popularity. Social proof effect.
  • "trending": Events experiencing momentum and increasing popularity. Captures betting volume spikes, rapid odds changes, unusual activity patterns, social media buzz. Time-sensitive opportunities.
  • "similar": Events similar to specified reference events (requires similarEventIds parameter). AI finds comparable matches based on sport, league, teams, odds, market characteristics, timing.
recommendationType.activestringFirst value from availableInitially active/selected recommendation type. Must be one value from available array. When categoryLayout: "tabs", determines which tab displays first. When categoryLayout: "expanded", determines initial scroll position/emphasis. Example: "popular" starts with popular recommendations visible.
recommendationType.hiddenbooleanfalseControls visibility of recommendation type selector. When true, hides category tabs/headers entirely (widget shows events from active type only, no switching UI). When false, shows navigation between recommendation types. Set true for single-type focused displays, clean minimal layouts.
sportobjectundefinedSport filter configuration.
sport.availablearray<string|number>[]Array of Sportradar sport IDs to include in recommendations and sport filter. Empty array or omitted shows all available sports. Example: [1, 2, 5] for soccer, basketball, tennis only. When provided, widget shows sport filter UI with these options. See Sports Reference.
sport.hiddenbooleanfalseControls visibility of sport filter UI. When true, hides sport selector (events still filtered by sport.available if specified, but no user-facing filter controls). When false, shows sport filter icons/tabs for user selection. Set true for single-sport pages, clean minimal interfaces.
sport.sportNamesbooleanfalseDisplay mode for sport filter. When true, shows sport names as text labels instead of sport icons. When false, shows sport-specific icons (⚽ soccer, 🏀 basketball, etc.). Set true for accessibility, text-heavy designs, or when icons unclear to users.
timeobjectundefinedTime/status filter configuration for event scheduling.
time.availablearray<string>["live", "not_started"]Array of available time filter options. Options: "live" (only live/in-play events), "not_started" (only upcoming/pre-match events). Example: ["live"] shows live-only filter, ["not_started"] shows upcoming-only, ["live", "not_started"] shows both with toggle.
time.activearray<string>All values from availableInitially active time filters. Can select multiple values from available array for combined filtering. Example: ["live"] starts showing live events only, ["live", "not_started"] shows both (no time filtering), [] shows nothing (edge case - avoid).
time.hiddenbooleanfalseControls visibility of time filter UI. When true, hides time selector (events still filtered by time.active, but no user controls). When false, shows time filter toggle/buttons. Set true for fixed time scope pages (e.g., "Live Betting Hub" always shows live).
countryobjectundefinedCountry/region filter configuration.
country.availablearray<string|number>undefinedArray of country identifiers to filter events geographically. Accepts Sportradar country IDs or ISO country codes (A2/A3). Example: ["US", "GB", "DE"] shows only events from USA, UK, Germany. When provided, only events from specified countries appear. See Getting Identifiers.
leagueobjectundefinedLeague/tournament filter configuration.
league.availablearray<string|number>undefinedArray of tournament/league identifiers to filter events by competition. Accepts Sportradar unique tournament IDs. Example: ["sr:tournament:17", "sr:tournament:34"] shows only Premier League and Bundesliga events. Powerful for league-specific pages or premium competition focus. See Getting Identifiers.

Filters Example

javascript
{
  recommendationType: {
    available: ['recommended', 'popular', 'trending'],
    active: 'popular',
    hidden: false
  },
  sport: {
    available: [1, 2, 5],  // Soccer, Basketball, Tennis
    hidden: false,
    sportNames: false
  },
  time: {
    available: ['live', 'not_started'],
    active: ['live', 'not_started']  // Show both
  },
  country: {
    available: ['GB', 'DE', 'ES', 'IT']  // Top European countries
  },
  league: {
    available: [
      'sr:tournament:17',   // Premier League
      'sr:tournament:34',   // Bundesliga
      'sr:tournament:7'     // La Liga
    ]
  }
}
srct-br-content
background-color
srct-br-content__titlecolor
srct-br-cardlistbackground-color, border-radius
srct-br-cardbackground-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
srct-br-scoreboard__score-3font-size, color

Basic horizontal grid with popular and trending recommendations.

JavaScript

javascript
SIR("addWidget", "#highlights-1", "betRecommendation", {
  count: 24,
  maxRows: 3,
  filters: {
    recommendationType: {
      available: ["popular", "trending"],
    },
  },
});

HTML (data attributes)

html
<div
  class="sr-widget"
  data-sr-widget="betRecommendation"
  data-count="24"
  data-max-rows="3"
  data-filters='{"recommendationType": {"available": ["popular", "trending"]}}'
></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.