This tutorial is for:
By completing this tutorial, you will:
Before starting this tutorial, ensure you have:
These configuration options work for all sports but are particularly important for US sports markets where different display conventions are expected.
US sports have different display conventions compared to international formats:
This tutorial shows you how to configure these settings globally in the widgetloader.
Create your HTML page with basic styling to center and contain the widget.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>US Sports Integration</title>
<style>
body {
display: flex;
justify-content: center;
}
.widgets {
max-width: 620px;
width: 100%;
}
.sr-widget {
border: rgba(0,0,0,0.12) solid 1px;
margin-bottom: 24px;
}
</style>
</head>
<body>
<div class="widgets">
<div class="sr-widget sr-widget-1"></div>
</div>
</body>
</html>Initialize the widget framework with US-specific configuration options.
(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", {
theme: 'sportradar',
language: "en",
clockType: 12,
resultSeparator: "-",
teamInvert: { sid: { 2: true } }
});Configuration Option Details
| Option | Value | Description |
|---|---|---|
clockType | 12 or 24 | Sets 12-hour (AM/PM) or 24-hour time format. Use 12 for US markets. |
resultSeparator | Any string | Character(s) between team scores. US standard is "-" (e.g., "102-98"). |
teamInvert | Object | Controls which team appears on left/right. Accepts all: true or sid: { [sportId]: true }. |
Team Invert Options:
{ all: true } - Inverts teams for every sport{ sid: { 2: true } } - Only inverts Basketball (sport ID 2){ sid: { 2: true, 4: true } } - Basketball and Ice HockeyCommon US Sport IDs:
2 - Basketball3 - Baseball4 - Ice Hockey16 - American FootballFor most US integrations, you'll want to invert all sports: teamInvert: { all: true }
Use the SIR function to add your widget with the appropriate match ID.
SIR("addWidget", ".sr-widget-1", "match.lmtPlus", {
matchId: 'your_match_id_here'
});Replace your_match_id_here with a valid match ID from a US sport. The widget will automatically use the global configuration settings.
View Complete Working Example
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>US Sports Integration</title>
<style>
body {
display: flex;
justify-content: center;
}
.widgets {
max-width: 620px;
width: 100%;
}
.sr-widget {
border: rgba(0,0,0,0.12) solid 1px;
margin-bottom: 24px;
}
</style>
</head>
<body>
<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", {
theme: 'sportradar',
language: "en",
clockType: 12,
resultSeparator: "-",
teamInvert: { all: true } // Invert all sports for US market
});
SIR("addWidget", ".sr-widget-1", "match.lmtPlus", {
matchId: 'your_match_id_here'
});
</script>
<div class="widgets">
<div class="sr-widget sr-widget-1"></div>
</div>
</body>
</html>For a fully US-market integration, invert all sports:
{
clockType: 12,
resultSeparator: "-",
teamInvert: { all: true }
}Changing these global settings affects all widgets on the page. If you need different formats for different widgets, you'll need to reload the framework or use separate pages.
For advanced widget-specific configurations, see: