Widget Docs
Coverage MatrixDocumentationChange LogLog InContact Us
Widget Docs

Score

us.match.nfl.score displays the current score, the teams represented by name and logo, the game status, and other key game-related information as collapsible content.

For the widget to render you must provide a valid matchId. All other properties are optional.

This widget displays date/time in your local timezone (based on operating system settings).

Parameters

NameTypeDescription
propsobjectproperties
NameTypeArgumentDefaultDescription
matchIdstringrequiredMatch ID
showDatebooleanoptionalShows the date of future games.
isCollapsedbooleanoptional'true'If false collapses collapsible content (i.e. game information).
disablePitchbooleanoptionalIf true hides the field/pitch.
disableLastPlaybooleanoptionalIf true hides last play info.
disableHeaderbooleanoptionalIf true hides the header.
disableGameInfobooleanoptionalIf true hides the expandable bottom section containing game details.
disableAttendancefunctionoptionalIf true hides attendance content.
autoSlidebooleanoptionalDisables auto sliding of the content in the game info section.
autoSlideSpeednumberoptionalSets the delay of auto sliding of the content in the game info section (in milliseconds).
enableTeamSelectbooleanoptionalIf true enables team onItemClick target.
enablePlayerSelectbooleanoptionalIf true hides field/pitch player onItemClick target.
enableMatchClickbooleanoptionalIf true hides field/pitch match onItemClick target and disables all other targets.
preMatchLinksstringoptionalComma separated string of link keys for pre-game. Can be undefined, default, preview, boxscore, gametracker, or recap. Entering default is the same as entering 'preview'.
liveMatchLinksstringoptionalComma separated string of link keys for a live game. Can be undefined, default, preview, boxscore, gametracker, or recap. Entering default is the same as entering 'boxscore, gametracker'.
postMatchLinksstringoptionalComma separated string of link keys for post-game. Can be undefined, default, preview, boxscore, gametracker, or recap. Entering default is the same as entering 'boxscore, recap'.
borderbooleanoptionaltrueIf false hides a border around the widget.
onItemClickfunctionoptionalFunction/event handler. More info below.

By default, all widget click target areas are disabled.

The enableTeamSelect enables team targets. enablePlayerSelect enables a player targets. The player targets appear in the Game Information section depending on game status.

enableMatchClick enables a match target and disables all other targets. With preMatchLinks, liveMatchLinks and/or postMatchLinks set the widget gets preview, boxscore, gametracker and/or recap targets.

All targets emit the following match props on click or touch: matchId, sportId, realCategoryId, seasonId, seasonType, week, awayTeamId, homeTeamId, awayTeamUid, homeTeamUid.

Team target adds teamId, player target adds playerId and teamId, match target adds matchStatus, Valid matchStatus values are: pre, live, post.

Examples

"team",{"teamId":"sd:team:82cf9565-6eb9-4f01-bdbd-5aa0d472fcd9","matchId":"sd:match:ee83c78d-f7eb-46fc-a851-e5e3b2a82f44","seasonId":2020,"seasonType":"REG","week":10,"awayTeamId":"sd:team:82cf9565-6eb9-4f01-bdbd-5aa0d472fcd9","homeTeamId":"sd:team:d26a1ca5-722d-4274-8f97-c92e49c96315","awayTeamUid":"4421","homeTeamUid":"367364"} "player",{"playerId":"sd:player:5812204c-6dae-4450-8011-99e0f72864ac","teamId":"sd:team:d26a1ca5-722d-4274-8f97-c92e49c96315","matchId":"sd:match:ee83c78d-f7eb-46fc-a851-e5e3b2a82f44","seasonId":2020,"seasonType":"REG","week":10,"awayTeamId":"sd:team:82cf9565-6eb9-4f01-bdbd-5aa0d472fcd9","homeTeamId":"sd:team:d26a1ca5-722d-4274-8f97-c92e49c96315","awayTeamUid":"4421","homeTeamUid":"367364"} "box_score",{"matchId":"sd:match:ee83c78d-f7eb-46fc-a851-e5e3b2a82f44","seasonId":2020,"seasonType":"REG","week":10,"awayTeamId":"sd:team:82cf9565-6eb9-4f01-bdbd-5aa0d472fcd9","homeTeamId":"sd:team:d26a1ca5-722d-4274-8f97-c92e49c96315","awayTeamUid":"4421","homeTeamUid":"367364"} "match",{"matchId":"sd:match:ee83c78d-f7eb-46fc-a851-e5e3b2a82f44","matchStatus":"post","seasonId":2020,"sportId":16,"seasonType":"REG","week":10,"awayTeamId":"sd:team:82cf9565-6eb9-4f01-bdbd-5aa0d472fcd9","homeTeamId":"sd:team:d26a1ca5-722d-4274-8f97-c92e49c96315","awayTeamUid":"4421","homeTeamUid":"367364"}
<div class="sr-widget" data-sr-widget="us.match.nfl.score" data-sr-match-id="sd:match:5c981331-29d9-4c65-b4f2-5e1101295b3e"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader" data-sr-language="en_us" async></script>
</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.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.match.nfl.score', {matchId: sd:match:5c981331-29d9-4c65-b4f2-5e1101295b3e});
</script>
<div id="sr-widget"></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.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.match.nfl.score', {matchId: sd:match:5c981331-29d9-4c65-b4f2-5e1101295b3e, postMatchLinks: 'default', onItemClick: function(target, obj){alert(target+':'JSON.stringify(obj));}});
</script>
<div id="sr-widget"></div>