Widgets.us.player.nfl.Statistics

Widget us.player.nfl.statistics brings statistics of each player from multiple seasons as well as current games. It contains statistics for passing, rushing, receiving, downs etc.

For the widget to render you need to provide playerId, seasonId and seasonType, other properties are optional.


new Statistics(props)

Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
playerId string

Player Id.

seasonId number

Season Id.

seasonType string

Season Type. Sets the season type, possible values are pre, reg, post.

disableWidgetHeader boolean <optional>
false

When set to true, hides widget header.

enableTeamSelect boolean <optional>
false

When set to true, enables team selection. Interactive areas are:

  • team crest,
  • player image.
TeamId is emitted on click or touch.

enablePlayerSelect boolean <optional>
false

When set to true, enables player selection. Interactive areas are:

  • player image.
PlayerId is emitted on click or touch.

onTrack function <optional>

Function/event handler, see Widgets.onTrack.

border boolean <optional>

If true, it draws a border around widget.

Examples

HTML/Declarative

<div id="sr-widget" data-sr-widget="us.player.nfl.statistics" data-sr-player-id="sd:player:c3859e06-5f23-4302-a71b-04820a899d5f" data-sr-season-id="2015" data-sr-season-type="reg"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/uscommon/widgetloader" data-sr-language="en_us" async></script>

JS/Programmatic

<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/uscommon/widgetloader","USW", {
        language: 'en_us'
    });
    USW('addWidget', '#sr-widget', 'us.player.nfl.statistics', {playerId: 'sd:player:41c44740-d0f6-44ab-8347-3b5d515e5ecf', seasonId: 2020, seasonType: 'reg'});
</script>
<div id="sr-widget"></div>